任务描述:
内部开发网络(与外网断开)
服务器:172.28.1.X
工作站:172.28.2.X
在装有Trac的机器上配个mail server用于发送新增任务时的通知邮件
软件环境:
使用CentOS默认安装的sendmail、sasl2、dovecot
采用系统用户帐号做为邮件用户名
随便起个内部用的域名,如:yemaosheng.com(各工作站改hosts文件进行绑定)
配置步骤:
vi /etc/mail/access
172.28.1 RELAY
172.28.2 RELAY
yemaosheng.com RELAY |
172.28.1 RELAY
172.28.2 RELAY
yemaosheng.com RELAY
makemap hash access.dbdnl #line 52
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #line 53
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #line 116
DAEMON_OPTIONS('PORT-SMTP,ADDR=0.0.0.0,NAME=MTA')dnl
dnl #line 156
LOCAL_DOMAIN('yemaosheng.com')dnl |
dnl #line 52
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #line 53
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
dnl #line 116
DAEMON_OPTIONS('PORT-SMTP,ADDR=0.0.0.0,NAME=MTA')dnl
dnl #line 156
LOCAL_DOMAIN('yemaosheng.com')dnl
m4 sendmail.mc > sendmail.cf
echo “yemaosheng.com”>/etc/mail/local-host-names
testsaslauthd -u system_username -p password
显示Ok “Success.”就对了,否则执行saslauthd -a shadow 或vi /etc/sysconfig/saslauthd 改为 MECH=shadow
/etc/init.d/sendmail start
/etc/init.d/dovecot start
/etc/init.d/saslauthd start
Related Posts