setsebool -P httpd_can_sendmail=on
Yum –y install sendmail
Yum –y install sendmail-cf
Yum –y install dovecot
配置/sendmail.mc
修改116 设置ip0.0.0.0
修改155为邮件服务域名
M4 sendmail.mc > sendmail.cf
vim /etc/dovecot/dovecot.conf
line 24: uncomment
protocols = imap pop3 lmtp
vim /etc/dovecot/conf.d/10-auth.conf
line 10: uncomment and change
disable_plaintext_auth = no
line 100: add
auth_mechanisms = plain login
vim /etc/dovecot/conf.d/10-mail.conf
line 30: uncomment and add
mail_location = maildir:~/Maildir
line 31
vim /etc/dovecot/conf.d/10-ssl.conf
line 8: change
ssl = yes
useradd mail3
useradd mail4
给mail目录用户文件夹 777特权
service postfix stop
vim /etc/mail/access
makemap hash access.db < access
vi /etc/mail/submit.cf
找到行 #Dj$w.Foo.COM,修改为netdj.net
vim /etc/mail/local-host-names
vim /etc/aliases
everyone: mail3,mail4
Service sendmail restart
Service dovecot restat
Service saslauthd restart