Назад | Перейти на главную страницу

Отложено: время ожидания соединения истекло

Я устанавливаю Sendmail на ящик Debian. Я пробовал дважды, и каждый раз получаю ошибку отложенного подключения. Я выполнил следующие процессы:

apt-get purge sendmail*
apt update
apt install sendmail sendmail-cf m4
sendmailconfig (I answered Y to all)
sendmail -vt < ~/mail.txt (FAILED)
nano /etc/mail/local-host-names (added web1 and web1.mydomain.com)
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart
sendmail -vt < ~/mail.txt

Содержимое hostnamectl:

root@web1:~# hostnamectl
   Static hostname: web1.mydomain.com
     Icon name: computer-vm
       Chassis: vm
    Machine ID: bf9dd17320f042e1b8715468578181b6
       Boot ID: 8981063e23dd4c07905ea630f2ab0a75
    Virtualization: kvm
  Operating System: Debian GNU/Linux 10 (buster)
        Kernel: Linux 4.19.0-9-amd64
      Architecture: x86-64

И содержимое / etc / hosts

127.0.0.1       localhost web1.mydomain.com
213.168.250.175 web1

Мое сообщение принято Sendmail для отправки, но никогда не завершается. Обычно эта проблема может быть связана с ошибкой telneting-порта 25, но я проверил это и прошел успешно.

Вот результаты, когда я запускаю команду sendmail:

root@web1:~# sendmail -vt < ~/mail.txt
test-60gvg4qzb@srv1.mail-tester.com... Connecting to [127.0.0.1] via relay...
220 web1.mydomain.com ESMTP Sendmail 8.15.2/8.15.2/Debian-14~deb10u1; Wed, 1 Jul 2020 18:08:16 +0100; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO web1.mydomain.com
250-web1.mydomain.com 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:<surveymechanics@web1.mydomain.com> SIZE=156 AUTH=surveymechanics@web1.mydomain.com
250 2.1.0 <surveymechanics@web1.mydomain.com>... Sender ok
>>> RCPT To:<test-60gvg4qzb@srv1.mail-tester.com>
>>> DATA
250 2.1.5 <test-60gvg4qzb@srv1.mail-tester.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <test-60gvg4qzb@srv1.mail-tester.com>... Connecting to reception.mail-tester.com. via esmtp...
050 <test-60gvg4qzb@srv1.mail-tester.com>... Deferred: Connection timed out with reception.mail-tester.com.
250 2.0.0 061H8GYO004063 Message accepted for delivery
test-60gvg4qzb@srv1.mail-tester.com... Sent (061H8GYO004063 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 web1.mydomain.com closing connection
root@web1:~# sendmail -vt < ~/mail.txt -i -t
test-60gvg4qzb@srv1.mail-tester.com... Connecting to [127.0.0.1] via relay...
220 web1.mydomain.com ESMTP Sendmail 8.15.2/8.15.2/Debian-14~deb10u1; Wed, 1 Jul 2020 18:09:32 +0100; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
>>> EHLO web1.mydomain.com
250-web1.mydomain.com 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:<surveymechanics@web1.mydomain.com> SIZE=156 AUTH=surveymechanics@web1.mydomain.com
250 2.1.0 <surveymechanics@web1.mydomain.com>... Sender ok
>>> RCPT To:<test-60gvg4qzb@srv1.mail-tester.com>
>>> DATA
250 2.1.5 <test-60gvg4qzb@srv1.mail-tester.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <test-60gvg4qzb@srv1.mail-tester.com>... Connecting to reception.mail-tester.com. via esmtp...
050 <test-60gvg4qzb@srv1.mail-tester.com>... Deferred: Connection timed out with reception.mail-tester.com.
250 2.0.0 061H9Wwn004147 Message accepted for delivery
test-60gvg4qzb@srv1.mail-tester.com... Sent (061H9Wwn004147 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 web1.mydomain.com closing connection

Почему мне откладывается соединение? Я просто не могу понять, что еще могло вызвать проблему.

Результаты с дополнительной отладкой:

root@web1:~# sendmail -vt < ~/mail.txt -i -t -d8.20 -d60.5 -Am -i
_res.options = 52c3, HasWildcardMX = 0
map_lookup(dequote, mydomain, %0=mydomain) => NOT FOUND (0)
map_lookup(host, srv1.mail-tester.com, %0=srv1.mail-tester.com) => dns_getcanonname(srv1.mail-tester.com, trymx=1)
dns_getcanonname: trying srv1.mail-tester.com. (AAAA)
    NO: errno=0, h_errno=4
dns_getcanonname: trying srv1.mail-tester.com. (A)
    NO: errno=0, h_errno=4
dns_getcanonname: trying srv1.mail-tester.com. (MX)
    YES
dns_getcanonname: srv1.mail-tester.com
srv1.mail-tester.com. (0)
getmxrr(srv1.mail-tester.com., droplocalhost=1)
test-60gvg4qzb@srv1.mail-tester.com... Connecting to reception.mail-tester.com. via esmtp...
test-60gvg4qzb@srv1.mail-tester.com... Deferred: Connection timed out with reception.mail-tester.com.