【问题标题】:Exim Mail Transfer Agent can't deliver mailExim Mail Transfer Agent 无法投递邮件
【发布时间】:2013-09-12 23:49:35
【问题描述】:

exim MTA 有问题,它无法发送任何邮件。

我遵循了如何设置 MTA 的简单直接的指南:https://library.linode.com/email/exim/send-only-mta-ubuntu-12.04-precise-pangolin

但是当我最后测试配置时,它发送失败。

发出命令时我没有收到任何错误消息:

echo "This is test 1." | mail -s Testing_1 myemail@gmail.com

echo "This is test 2." | mail -s Testing_2 myemail@hotmail.com

但我可以在日志 (/var/log/exim4/mainlog) 中读到它没有成功发送(并且我没有收到任何电子邮件)。

我该怎么办,我不知道出了什么问题...?? 我的第一个想法是路由器(或防火墙)阻止了我的 MTA,但日志显示它已与外部联系,所以我认为这不是问题

感谢我能得到的所有帮助。

编辑:我必须通过设置配置来使用 ISP 邮件主机:dc_smarthost='mailout.isp.com' 并为 Exim 添加重写规则,将我的帐户电子邮件地址与 ISP 匹配。

/约翰

exim4.conf-文件(/etc/exim4/update-exim4.conf.conf):

dc_eximconfig_configtype='internet'
dc_other_hostnames='PandaBoard; mydomain.net; meetup; localhost.localdomain; localhost'
dc_local_interfaces='127.0.0.1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost=''
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname=''
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

Exim4 日志:

2013-09-13 00:13:35 exim 4.76 daemon started: pid=17823, -q30m, listening for SMTP on [127.0.0.1]:25 [::1]:25
2013-09-13 00:13:35 Start queue run: pid=17825
2013-09-13 00:13:35 End queue run: pid=17825
2013-09-13 00:23:11 exim 4.76 daemon started: pid=18570, -q30m, listening for SMTP on [127.0.0.1]:25 [::1]:25
2013-09-13 00:23:11 Start queue run: pid=18572
2013-09-13 00:23:11 End queue run: pid=18572

2013-09-13 00:24:17 1VKFJB-0004pm-Uf <= john@mydomain.net U=john P=local S=404
2013-09-13 00:24:18 1VKFJB-0004pm-Uf gmail-smtp-in.l.google.com [2a00:1450:4008:c01::1b] Network is unreachable
2013-09-13 00:25:22 1VKFJB-0004pm-Uf gmail-smtp-in.l.google.com [173.194.71.26] Connection timed out
2013-09-13 00:25:22 1VKFJB-0004pm-Uf alt1.gmail-smtp-in.l.google.com [2607:f8b0:4003:c02::1a] Network is unreachable
2013-09-13 00:26:26 1VKFJB-0004pm-Uf alt1.gmail-smtp-in.l.google.com [173.194.64.27] Connection timed out
2013-09-13 00:26:26 1VKFJB-0004pm-Uf == myemail@gmail.com R=dnslookup T=remote_smtp defer (101): Network is unreachable

2013-09-13 00:46:26 exim 4.76 daemon started: pid=19280, -q30m, listening for SMTP on [127.0.0.1]:25
2013-09-13 00:46:26 Start queue run: pid=19282

2013-09-13 01:03:55 1VKFvX-00052n-9V <= john@mydomain.net U=john P=local S=402
2013-09-13 01:05:00 1VKFvX-00052n-9V mx3.hotmail.com [65.54.188.94] Connection timed out
2013-09-13 01:06:04 1VKFvX-00052n-9V mx3.hotmail.com [65.54.188.72] Connection timed out
2013-09-13 01:07:08 1VKFvX-00052n-9V mx3.hotmail.com [65.55.37.72] Connection timed out
2013-09-13 01:08:13 1VKFvX-00052n-9V mx3.hotmail.com [65.55.92.136] Connection timed out
2013-09-13 01:09:18 1VKFvX-00052n-9V mx3.hotmail.com [65.55.92.168] Connection timed out
2013-09-13 01:09:18 1VKFvX-00052n-9V == myemail@hotmail.com R=dnslookup T=remote_smtp defer (110): Connection timed out
2013-09-13 01:16:26 Start queue run: pid=19436

【问题讨论】:

    标签: email sendmail exim4


    【解决方案1】:

    在我看来,您的 ISP 阻止了到 tcp/25 的出站连接。你为什么拒绝最初的假设是防火墙?您引用的日志表明您的服务器可以发出 DNS 请求,但没有成功尝试连接到邮件服务器。它仍然可能是一个本地防火墙问题,但现在 ISP 阻止其客户向 tcp/25 发送电子邮件非常常见,除非您明确要求这样做(有时甚至没有)。

    将 exim 排除在外,然后从邮件服务器的命令行运行它:

    telnet 65.54.188.94 25
    

    如果您可以连接,则说明您的 exim 安装有问题。如果无法连接,是网络问题,无论是本地防火墙、ISP 防火墙等。

    【讨论】:

      【解决方案2】:

      使用应该首先检查是否有任何防火墙(iptables、csf...)在您的服务器上运行。 如果是,请将其关闭并尝试测试 telnet 到外部邮件服务器,例如:

      telnet external_mail_server 25
      

      如果没问题,您应该检查 exim 配置。 如果不是,您应该联系您的托管服务提供商

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-09-13
        • 2012-08-01
        • 2017-08-28
        • 1970-01-01
        • 2015-07-07
        • 2016-03-25
        • 1970-01-01
        相关资源
        最近更新 更多