快速业务通道

linux上安装基于postfix的全功能邮件服务器(2)

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-26

  八、为postfix开启基于cyrus-sasl的认证功能

  使用以下命令验正postfix是否支持cyrus风格的sasl认证,如果您的输出为以下结果,则是支持的:

  # /usr/local/postfix/sbin/postconf -a

  cyrus

  dovecot

  #vi /etc/postfix/main.cf

  添加以下内容:

  ############################CYRUS-SASL############################

  broken_sasl_auth_clients = yes

  smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination

  smtpd_sasl_auth_enable = yes

  smtpd_sasl_local_domain = $myhostname

  smtpd_sasl_security_options = noanonymous

  smtpd_sasl_application_name = smtpd

  smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!

  #vi /usr/local/lib/sasl2/smtpd.conf

  添加如下内容:

  pwcheck_method: saslauthd

  mech_list: PLAIN LOGIN

  让postfix重新加载配置文件

  #/usr/local/postfix/sbin/postfix reload

  九、让postfix支持虚拟域和虚拟用户

  1、编辑/etc/postfix/main.cf,添加如下内容:

  ########################Virtual Mailbox Settings########################

  virtual_mailbox_base = /var/spool/mail

  virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

  virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf

  virtual_alias_domains =

  virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf

  virtual_uid_maps = static:2525

  virtual_gid_maps = static:2525

  virtual_transport = virtual

  maildrop_destination_recipient_limit = 1

  maildrop_destination_concurrency_limit = 1

  ##########################QUOTA Settings########################

  message_size_limit = 14336000

  virtual_mailbox_limit = 20971520

  virtual_create_maildirsize = yes

  virtual_mailbox_extended = yes

  virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf

  virtual_mailbox_limit_override = yes

  virtual_maildir_limit_message = Sorry, the user''s maildir has overdrawn his diskspace quota, please Tidy your mailbox and try again later.

  virtual_overquota_bounce = yes

  2、添加为支持虚拟域和虚拟用户所用到的配置文件

  编辑/etc/postfix/mysql_virtual_alias_maps.cf ,添加如下内容:

  user = extmail

  password = extmail

  hosts = localhost

  dbname = extmail

  table = alias

  select_field = goto

  where_field = address

  编辑/etc/postfix/mysql_virtual_domains_maps.cf ,添加如下内容:

  user = extmail

  password = extmail

  hosts = localhost

  dbname = extmail

  table = domain

  select_field = description

  where_field = domain

  编辑/etc/postfix/mysql_virtual_mailbox_limit_maps.cf ,添加如下内容:

  user = extmail

  password = extmail

  hosts = localhost

  dbname = extmail

  table = mailbox

  

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号