mail邮局系统的MX(邮件交换)记录配置,以便收发邮件。(MX记录,是邮件交换记录,它指向一个邮件服务器,用于电子邮件系统发邮件时根据收信人的地址后缀来定位邮件服务器,如果没有做域名解析,邮局不能正常使用,即不能正常的发送或者接收邮件。)
centos6:postfix加dovecot邮件服务器配置
安装postfix和dovecot
yum install postfix dovecot
chkconfig postfix on
chkconfig dovecot on
配置postfix
vi /etc/postfix/main.cf
# change or add on these line: myhostname = mail.zhetenger.com mydomain = zhetenger.com myorigin = $mydomain inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain mynetworks = 127.0.0.0/8 home_mailbox = Maildir/ smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit broken_sasl_auth_clients = yes
重启postfix/etc/init.d/postfix restart
dovecot配置
vi /etc/dovecot/dovecot.conf
# uncomment on this line: protocols = imap pop3 listen = *
配置认证方式
vi /etc/dovecot/conf.d/10-auth.conf
# change on these line: disable_plaintext_auth = no auth_mechanisms = plain login
设置邮箱文件夹
vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
配置认证
vi /etc/dovecot/conf.d/10-master.conf
# commented on these line: #unix_listener auth-userdb { #mode = 0600 #user = #group = #} # change or setup on these line: # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix }
配置pop3
vi /etc/dovecot/conf.d/20-pop3.conf
# uncomment on these line: pop3_uidl_format = %08Xu%08Xv pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
重启dovecot
/etc/init.d/dovecot restart
大功告成!
(CentOS)Centos6.3下搭建postfix/dovecot服务
1.安装和配置dovecot软件 yum install -y dovecot
[root@localhost conf.d]# nslookup> set type=mx> abc.comServer: 192.168.2.115Address: 192.168.2.115#53abc.com mail exchanger = 5 mail.abc.com.> exit[root@localhost conf.d]# dovecot -n# 2.0.9: /etc/dovecot/dovecot.conf# OS: Linux 2.6.32-279.el6.x86_64 x86_64 CentOS release 6.3 (Final)disable_plaintext_auth = no /*配置文件在/etc/dovecot/conf.d/10-auth.conflogin_trusted_networks = 0.0.0.0/0mail_location = mbox:~/mail:INBOX=/var/mail/%u /*配置文件在/etc/dovecot/conf.d/10-mail.confmbox_write_locks = fcntl /*配置文件在/etc/dovecot/conf.d/10-mail.confpassdb {driver = pam}ssl_cert = </etc/pki/dovecot/certs/dovecot.pemssl_key = </etc/pki/dovecot/private/dovecot.pemuserdb {driver = passwd} /*其余配置文件在/etc/dovecot/dovecot.conf[root@localhost conf.d]#
2.安装和配置postfix软件 yum install -y postfix (Note:postfix配置大部分在/etc/postfix/main.cf下,这里也只需配置该文件即可,根据下面对应修改就好。中英文对译,不是很难,〒_〒)
[root@localhost conf.d]# postconf -nalias_database = hash:/etc/aliasesalias_maps = hash:/etc/aliasescommand_directory = /usr/sbinconfig_directory = /etc/postfixdaemon_directory = /usr/libexec/postfixdata_directory = /var/lib/postfixdebug_peer_level = 2html_directory = noinet_interfaces = allinet_protocols = allmail_owner = postfixmailq_path = /usr/bin/mailq.postfixmanpage_directory = /usr/share/manmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, pop3.$mydomain, smtp.$mydomain, www.$mydomainmydomain = abc.commyhostname = mail.abc.commynetworks = 192.168.2.0/24, 192.168.8.0/24, 127.0.0.0/8mynetworks_style = subnetmyorigin = $mydomainnewaliases_path = /usr/bin/newaliases.postfixqueue_directory = /var/spool/postfixreadme_directory = /usr/share/doc/postfix-2.6.6/README_FILESrelay_domains = $mydestinationsample_directory = /usr/share/doc/postfix-2.6.6/samplessendmail_path = /usr/sbin/sendmail.postfixsetgid_group = postdropunknown_local_recipient_reject_code = 550[root@localhost conf.d]# cd ..
3.创建用户进行测试 test0和test1 不多说了。使用fixmail进行测试。