Centos 7 - Sendmail 无法正常工作

Centos 7 - Sendmail 无法正常工作

我正在尝试在我的 centos 7 服务器上设置 sendmail,但由于某种原因失败了。我在防火墙命令上打开了端口 25/tcp,并且 selinux 也已禁用。它仍然不起作用... /var/log/maillog 日志:

Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: [email protected], size=101, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jul 25 14:14:34 mail sendmail[12275]: NOQUEUE: tcpwrappers (localhost, 127.0.0.1) rejection
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: [email protected], [email protected] (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30101, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlI012274: u6PBEYlJ012274: DSN: Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: [email protected], delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31125, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: u6PBEYlK012274: return to sender: Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlK012274: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32149, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: Losing ./qfu6PBEYlJ012274: savemail panic
Jul 25 14:14:34 mail sendmail[12274]: u6PBEYlJ012274: SYSERR(root): savemail: cannot save rejected email anywhere

感谢@Andrzej A. Filip 的回答,我现在在日志中看到了这一点:

Jul 25 17:26:00 mail sendmail[3812]: u6PEPxur003812: [email protected], size=102, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
Jul 25 17:26:00 mail sendmail[3813]: u6PEQ0Bs003813: from=<[email protected]>, size=347, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Jul 25 17:26:00 mail sendmail[3812]: u6PEPxur003812: [email protected], [email protected] (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30102, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (u6PEQ0Bs003813 Message accepted for delivery)

但邮件仍未到达目的地...

答案1

您的 sendmail 似乎使用了 tcpwrappers。tcpwrappers 似乎拒绝与 127.0.0.1:25 的电子邮件连接。
此类连接用于将通过 sendmail 命令提交的电子邮件传递到本地 sendmail 守护程序。

使固定:
检查并修复 tcpwrappers 配置文件:/etc/hosts.allow/etc/hosts.deny

相关内容