我有一个新的CentOS 6.7盒子来设置sendmail。 它似乎发送电子邮件,但不是真的,不知道这个问题可能是什么。
我做了什么:
yum install sendmail sendmail-cf sendmail-doc sendmail-devel telnet service sendmail start chkconfig sendmail on chkconfig --list sendmail ls -l /etc/mail telnet localhost 25 chkconfig --level 25 sendmail service iptables stop
telnet连接成功,iptables停止,以减less任何并发症。
testingsendmail:
mail -v -s 'testing sendmail' [email protected] < /etc/passwd 2.1.0 <[email protected]>... Sender ok </br> 2.1.5 <[email protected]>... Recipient ok Enter mail, end with "." on a line by itself 2.0.0 tA4Bud7a006235 Message accepted for delivery </br> [email protected]... Sent (tA4Bud7a006235 Message accepted for delivery) Closing connection to [127.0.0.1] QUIT 2.0.0 localhost.localdomain closing connection
现在这显示消息已经发送成功,但我不能看到我的收件箱中的任何电子邮件,如果)检查/var/log/maillog :
Nov 4 15:48:03 localhost sendmail[6852]: tA3HPSF2002371: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=22:22:35, xdelay=00:00:00, mailer=esmtp, pri=2732098, relay=mail.myDomain.com., dsn=4.0.0, stat=Deferred: Connection refused by mail.mydomain.com.
有任何想法吗?
正如maillog所说:
你正在尝试发送到myDomain.com ,sendmail不认为这是它的工作来处理该域的邮件,所以它转发到mail.mydomain.com (取自该域的MXlogging),反过来在端口25上似乎没有邮件服务器。
有关域和configuration的更多细节可能会有所帮助。