作者:吴佳云怡婷志贤 | 来源:互联网 | 2014-05-28 08:57
修改sendmail配置vi/etc/mail/sendmail.mc把最前面的dnl删除,变成:TRUST_AUTH_MECH(`EXTERNALDIGEST-MD5CRAM-MD5LOGINPLAIN)dnldefine(`confAUTH_MECHANISMS,`EXTERNALGSSAPIDIGEST-MD5C
修改
sendmail配置
vi /etc/mail/sendmail.mc
把最前面的dnl删除,变成:
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN
PLAIN')dnl
define(`confAUTH_MECHANISMS',`EXTERNAL GSSAPI DIGEST-MD5
CRAM-MD5 LOGIN PLAIN')dnl
修改SMTP的监听IP为 0.0.0.0
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
生成配置
m4 /etc/mail/sendmail.mc > /etc/sendmail.cf
***************************
如果出现:sendmail.mc:10: m4: cannot open
`/usr/share/sendmail-cf/m4/cf.m4': No such file or directory
说明需要安装sendmail-cf
yum install sendmail-cf
修改dovecot配置
vi /etc/dovecot.conf
去掉下面一行前面的#
#protocols =imap imaps pop3 pop3s
添加域名
vi /etc/mail/local-host-names
添加域名如:mydomain.com //每个域名一行
修改认证方式
vi /etc/sysconfig/saslauthd 找到第7行的:MECH=pam 改成:MECH=shadow
启动服务
service saslauthd start #启动saslauthd
chkconfig saslauthd on
#设置saslauthd开机自动启动
测试服务
testsaslauthd -u username -p password
如果显示0: OK “Success.”则表明saslauthd工作正常;
启动dovecot;
service dovecot start
chkconfig dovecot on
outlook配置
需要勾选服务器验证,否则会出现收件人拒收的错误,类似 Relaying denied. IP name lookup
failed
新增邮件用户
[root@localhost ~]# groupadd mailuser
[root@localhost ~]# adduser -g mailuser -s /sbin/nologin
test
[root@localhost ~]# passwd test