|
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
[iyunv@localhost conf.d]# nslookup
> set type=mx
> abc.com
Server: 192.168.2.115
Address: 192.168.2.115#53
abc.com mail exchanger = 5 mail.abc.com.
> exit
[iyunv@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.conf
login_trusted_networks = 0.0.0.0/0
mail_location = mbox:~/mail:INBOX=/var/mail/%u /*配置文件在/etc/dovecot/conf.d/10-mail.conf
mbox_write_locks = fcntl /*配置文件在/etc/dovecot/conf.d/10-mail.conf
passdb {
driver = pam
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
driver = passwd
} /*其余配置文件在/etc/dovecot/dovecot.conf
[iyunv@localhost conf.d]#
2.安装和配置postfix软件 yum install -y postfix (Note:postfix配置大部分在/etc/postfix/main.cf下,这里也只需配置该文件即可,根据下面对应修改就好。中英文对译,不是很难,〒_〒)
[iyunv@localhost conf.d]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, pop3.$mydomain, smtp.$mydomain, www.$mydomain
mydomain = abc.com
myhostname = mail.abc.com
mynetworks = 192.168.2.0/24, 192.168.8.0/24, 127.0.0.0/8
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
[iyunv@localhost conf.d]# cd ..
3.创建用户进行测试 test0和test1 不多说了。使用fixmail进行测试。

相互发送邮件进行测试 |
|
|