вчера я получал электронные письма из моего домена и обычно направлял их на сервер Gmail и другие. Сегодня просто перестал доставлять, получает но не пересылает.
Я эффективно использую старый добрый sendmail, есть ли какая-то схема, по которой рекомендуется периодически перезапускать сервер? И если я это сделаю, я рискую потерять сообщения в очереди (ps я не использую tmpfs)?
PS: Он застрял не только для Gmail, но и для всех направлений.
Отправляющая команда:
sendmail to@gmail.com < ./mailsample.txt
mailsample.txt содержание:
To: "to name" <to@gmail.com>
From: "my name" <sender@mydomain.com>
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<sender@mydomain.com>
MDeferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
rRFC822; to@gmail.com
RPFD:<to@gmail.com>
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 <to@gmail.com>; 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 to@gmail.com; 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 sender@mydomain.com using -f
H??To: "to name" <to@gmail.com>
H??From: sender@mydomain.com
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=<sender@mydomain.com>, 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: to=to@gmail.com, ctladdr=sender@mydomain.com (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=<to@gmail.com>, 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=<to@gmail.com>, 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=<to@gmail.com>, 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
<to@mydomain.com>... 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:<to@mydomain.com>
>>> 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] <to@mydomain.com> ... 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 подрастает по минутам. Что может останавливать машину?