昨天我收到了来自我域名的电子邮件,并正常将其转发到 Gmail 服务器和其他服务器。今天他干脆停止发送,他只接收邮件,不转发。
我正在有效地使用旧版 sendmail,是否有任何建议定期重启服务器的模式?如果我这样做,我可能会丢失排队的消息(注:我没有使用任何 tmpfs)?
PS:它不仅适用于 Gmail,还适用于所有目的地。
发送命令:
sendmail [email protected] < ./mailsample.txt
mailsample.txt内容:
To: "to name" <[email protected]>
From: "my name" <[email protected]>
Subject: now its a test
Actual message.
邮件卡在 mailq 中,如下所示
V8
T1566564615
K1566566003
N3
P210595
I202/1/265633
MDeferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.Fbs
$_localhost [127.0.0.1]
$rESMTP
$sip-177-34-27-94.sa-east-1.compute.internal
${daemon_flags}
${if_addr}127.0.0.1
S<[email protected]>
MDeferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
rRFC822; [email protected]
RPFD:<[email protected]>
H?P?Return-Path: <<81>g>
H??Received: from ip-177-34-27-94.sa-east-1.compute.internal (localhost [127.0.0.1])
by ip-177-34-27-94.sa-east-1.compute.internal (8.14.4/8.14.4) with ESMTP id x7NCoInA017234
for <[email protected]>; Fri, 23 Aug 2019 12:50:18 GMT
H??Received: (from mail@localhost)
by ip-177-34-27-94.sa-east-1.compute.internal (8.14.4/8.14.4/Submit) id x7NCoIdU017233
for [email protected]; Fri, 23 Aug 2019 12:50:18 GMT
H??Date: Fri, 23 Aug 2019 12:50:18 GMT
H??Message-Id: <201908231250.x7NCoIdU017233@ip-177-34-27-94.sa-east-1.compute.internal>
H??X-Authentication-Warning: ip-177-34-27-94.sa-east-1.compute.internal: mail set sender to [email protected] using -f
H??To: "to name" <[email protected]>
H??From: [email protected]
H??MIME-Version: 1.0
H??Subject: now its a test
.
邮件队列正在显示...
Aug 23 12:50:18 ip-177-34-27-94 sendmail[17234]: x7NCoInA017234: from=<[email protected]>, size=593, class=0, nrcpts=1, msgid=<201908231250.x7NCoIdU017233@ip-177-34-27-94.sa-east-1.compute.internal>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Aug 23 12:50:18 ip-177-34-27-94 sendmail[17233]: x7NCoIdU017233: [email protected], [email protected] (8/12), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30178, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (x7NCoInA017234 Message accepted for delivery)
Aug 23 12:55:18 ip-177-34-27-94 sendmail[17236]: x7NCoInA017234: to=<[email protected]>, delay=00:05:00, xdelay=00:05:00, mailer=esmtp, pri=120593, relay=alt4.gmail-smtp-in.l.google.com. [172.217.194.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Aug 23 13:13:22 ip-177-34-27-94 sendmail[17557]: x7NCoInA017234: to=<[email protected]>, delay=00:23:04, xdelay=00:05:00, mailer=esmtp, pri=210593, relay=alt4.gmail-smtp-in.l.google.com. [172.217.194.27], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
Aug 23 13:25:18 ip-177-34-27-94 sendmail[17520]: x7NCoInA017234: to=<[email protected]>, delay=00:35:00, xdelay=00:05:00, mailer=esmtp, pri=300593, relay=alt4.gmail-smtp-in.l.google.com. [172.217.194.27], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
IP 表:
[root@ip-172-31-28-93 ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
另一件似乎很重要的事情是 sendmail -v -q 输出
Running /var/spool/mqueue/x7NDGEZx017609 (sequence 4 of 146)
>>> RSET
250 2.0.0 Resetting
<[email protected]>... Using cached ESMTP connection to webfopag-com-br.mail.protection.outlook.com. via esmtp...
>>> MAIL From:<> SIZE=7263
250 2.1.0 Sender OK
>>> RCPT To:<[email protected]>
>>> DATA
550 5.7.606 Access denied, banned sending IP [54.93.220.30]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to http://go.microsoft.com/fwlink/?LinkID=526655 (AS16012609)
[BL2NAM02FT059.eop-nam02.prod.protection.outlook.com] <[email protected]> ... User unknown 503 5.5.2 Need rcpt command [BL2NAM02FT059.eop-nam02.prod.protection.outlook.com]
>>> RSET
250 2.0.0 Resetting
MAILER-DAEMON... aliased to postmaster
postmaster... aliased to root
postmaster... aliased to root
root... Connecting to local...
root... Sent
该服务器接收来自其他几台服务器的消息,并充当我网络上多域消息的出站门户。它不是开放中继,我们开发了一个程序,该程序使用用户名和密码接收消息,验证消息是否正确,然后才将消息传送到应在目标域中传送消息的本地服务器。但今天消息处于暂停状态!
昨天流量正常,今天 mailq 却每分钟都在增长。是什么原因导致机器停止运行?