CentOS5 配置 sendmail imap,pop3,smtp认证

 

查看安装linux

rpm -qa | grep sendmail
rpm -qa | grep dovecot
rpm -qa | grep cyrus服务器

安装邮件服务器dom

yum install sendmail sendmail-cf测试


安装pop3/imap服务网站

yum install dovecotrest


安装用户认证htm

yum install cyrus-sasl
yum install cyrus-sasl-md5
yum install cyrus-sasl-plain
yum install cyrus-sasl-libmd5

修改sendmail配置get

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 sendmail.mc > sendmail.cf

修改dovecot配置

vi /etc/dovecot.conf

去掉下面一行前面的#

#protocols =imap imaps pop3 pop3s

添加域名

vi /etc/mail/locl-host-names

添加域名如:yourdomain.com //每一个域名一行

修改认证方式

vi /usr/lib/sasl2/Sendmail.conf
将原内容:pwcheck_method:saslauthd
修改为:pwcheck_method:auxprop

查看映射用户

sasldblistusers2

运行 saslpasswd2 添加用户

saslpasswd2 -u yourdomain.com -a sendmail yourname@yourdomain.com

设置开机启动

chkconfig sendmail on
chkconfig dovecot on
chkconfig saslauthd on

重启

service sendmail restart
service dovecot restart
service saslauthd restart

ok,使用outlook或foxmail进行测试。


本篇文章来源于 Linux公社网站(www.linuxidc.com)  原文连接:http://www.linuxidc.com/Linux/2010-04/25788.htm

相关文章
相关标签/搜索