编辑 resolv.conf 后,Sendmail 停止工作。为什么?

编辑 resolv.conf 后,Sendmail 停止工作。为什么?

我之前通过将 resolv.conf 中的名称服务器更改为 Google 的名称服务器解决了上游超时错误的问题。

虽然通过这种方式解决了上游超时和 504 错误,但现在 sendmail 拒绝“sendmail”。

使用以下方法测试 sendmail:

echo "主题:测试" | /usr/lib/sendmail -v UncleStanley@re****mail.com

UncleStanley@re****mail.com... Connecting to [127.0.0.1] via relay...
220 sd-2***8.de**ox.ro ESMTP Sendmail 8.14.4/8.14.4/Debian-4; Mon, 7   Sep 2015 05:16:37 +0200; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO sd-2***8.de**ox.ro
250-sd-2***8.de**ox.ro Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> VERB
250 2.0.0 Verbose mode
>>> MAIL From:<root@sd-2***8.de**ox.ro> SIZE=14 AUTH=root@sd-2***8.de**ox.ro
250 2.1.0 <root@sd-2***8.de**ox.ro>... Sender ok
>>> RCPT To:<UncleStanley@re****mail.com>
>>> DATA
250 2.1.5 <UncleStanley@re****mail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself

. 050 ... 通过中继连接到 [smtp-server]... 050 ... 别名为 o****extr 050 o****extr... 连接到本地... 050 o****extr... 已发送 250 2.0.0 t873Gbx9003582 消息已接受并准备传送 [电子邮件保护]... 已发送(t873Gbx9003582 消息已接受传送)关闭与 [127.0.0.1] 的连接退出 221 2.0.0 sd-2***8.de**ox.ro 关闭连接

现在我想这似乎没问题。邮件已发送但尚未发送,因为消息尚未发送。

在 mail.info 日志中我发现

Sep  7 05:49:27 sd-28368 sendmail[4020]: t873nRpj004020: from=root, size=14, class=0, nrcpts=1, msgid=<201509070349.t873nRpj004020@sd-2***8.de**ox.ro>, rel$
Sep  7 05:49:27 sd-28368 sm-mta[4021]: t873nR8I004021: from=<root@sd-2***8.de**ox.ro>, size=307, class=0, nrcpts=1, msgid=<201509070349.t873nRpj004020@sd-2$
Sep  7 05:49:27 sd-28368 sm-mta[4021]: t873nR8I004021: to=<UncleStanley@re****mail.com>, ctladdr=<root@sd-2***8.de**ox.ro> (0/0), delay=00:00:00, xdelay=00:00:00,$
Sep  7 05:49:27 sd-28368 sm-mta[4021]: t873nR8I004021: t873nR8J004021: DSN: Host unknown (Name server: [smtp-server]: host not found)
Sep  7 05:49:27 sd-28368 sm-mta[4021]: t873nR8J004021: to=o****extr, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Sep  7 05:49:27 sd-28368 sendmail[4020]: t873nRpj004020: to=UncleStanley@re****mail.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=300$

DSN:主机未知(名称服务器:[smtp-server]:未找到主机)

现在,经过一些阅读,我了解到我可以使用外部 stmp 服务器。

但我的事情是,在我被迫更改 resolv.conf 中的名称服务器之前,我不需要做任何事情。

我确信我可能遗漏了一些非常简单的东西,但我找不到任何解决方案。有人知道如何解决这个问题吗?

我的 resolv.conf 如下:

domain on****.net
search on****.net
nameserver 62.265.16.6
nameserver 62.265.16.7

上述 resolv.conf 中的 IP 地址不是随服务器分配的 IP 地址。它们已被编辑。

相关内容