我有一个新创建的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 stoptelnet成功连接,iptables被停止,以减少任何并发症。
测试sendmail:
mail -v -s 'testing sendmail' myEmail@mydomain.com < /etc/passwd
2.1.0 <root@localhost.localdomain>... Sender ok </br>
2.1.5 <myEmail@mydomain.com>... Recipient ok
Enter mail, end with "." on a line by itself
2.0.0 tA4Bud7a006235 Message accepted for delivery </br>
myEmail@mydomain.com... 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=<myEmail@myDomain.com>, ctladdr=<root@localhost.localdomain> (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.有什么想法吗?
发布于 2015-11-04 16:49:15
正如maillog所说:
您试图发送到myDomain.com,sendmail并不认为处理该域的邮件是它的工作,因此它将它们转发给mail.mydomain.com (从该域的MX记录中获取),而后者似乎在端口25上没有邮件服务器。
有关域和所涉及的配置的更多细节可能会有所帮助。
https://serverfault.com/questions/733897
复制相似问题