|
|
我的作法如下:
1、vi /etc/mail/sendmail.mc
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
.........................
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
2、m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
3、service sendmail restart
4、看看有没有/etc/sysconfig/saslauthd文件,如果没有要安装postfix-2.0.11-4.rpm
5、cp /etc/pam.d/smtp.postfix /etc/pam.d/smtp
6、chkconfig saslauthd on
7、service saslauthd start
但是做完后,用foxmail这个软件,选上"SMTP认证",发不出去。日志内容如下:
messages内容如下:
Jun 26 23:16:13 rhel3 sendmail: sendmail shutdown succeeded
Jun 26 23:16:13 rhel3 sendmail: sm-client shutdown succeeded
Jun 26 23:16:14 rhel3 sendmail: sendmail startup succeeded
Jun 26 23:16:14 rhel3 sendmail: sm-client startup succeeded
Jun 26 23:17:46 rhel3 saslauthd[2297]: do_auth : auth failure: [user=jerry] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
maillog内容如下:
Jun 26 23:30:05 rhel3 sendmail[2505]: j5QFU4p7002505: ruleset=check_rcpt, arg1=<root@beiya.com>, relay=[192.168.0.29], reject=550 5.7.1 <root@beiya.com>... Relaying denied. IP name lookup failed [192.168.0.29]
Jun 26 23:30:05 rhel3 sendmail[2505]: j5QFU4p7002505: lost input channel from [192.168.0.29] to MTA after rcpt
Jun 26 23:30:05 rhel3 sendmail[2505]: j5QFU4p7002505: from=<jerry@beiya.com>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=[192.168.0.29]
Jun 26 23:30:05 rhel3 sendmail[2506]: j5QFU5p7002506: [192.168.0.29] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA |
|