На Centos'е поднял postfix.
подключаюсь по telnet к 25 порту и пытаюсь отправить письмо:
telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 server.localdomain ESMTP Postfix
ehlo mail.test
250-server.localdomain
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: test@mail.test
250 2.1.0 Ok
rcpt to: myemail@mail.ru
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
hello!!
.
250 2.0.0 Ok: queued as D20FB8455CC
quit
221 2.0.0 Bye
Connection closed by foreign host.
Письмо не приходит, пытаюсь сделать так:
cat /var/log/maillog | grep D20FB8455CC
Oct 17 16:41:06 server postfix/smtpd[6188]: D20FB8455CC: client=localhost[127.0.0.1]
Oct 17 16:41:33 server postfix/cleanup[6192]: D20FB8455CC: message-id=<20171017134106.D20FB8455CC@server.localdomain>
Oct 17 16:41:33 server postfix/qmgr[6166]: D20FB8455CC: from=<test@mail.test>, size=332, nrcpt=1 (queue active)
Ага, значит оно застряло в очереди, идем туда:
postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
D20FB8455CC 332 Tue Oct 17 16:40:14 test@mail.test
(connect to mxs.mail.ru[94.100.180.104]:25: Connection timed out)
myemail@mail.ru
-- 1 Kbytes in 2 Requests.
Делаю postqueue -f, и еще раз смотрю логи:
Oct 17 16:41:06 server postfix/smtpd[6188]: D20FB8455CC: client=localhost[127.0.0.1]
Oct 17 16:41:33 server postfix/cleanup[6192]: D20FB8455CC: message-id=<20171017134106.D20FB8455CC@server.localdomain>
Oct 17 16:41:33 server postfix/qmgr[6166]: D20FB8455CC: from=<test@mail.test>, size=332, nrcpt=1 (queue active)
Oct 17 16:41:47 server postfix/smtpd[6188]: disconnect from localhost[127.0.0.1]
Oct 17 16:42:03 server postfix/smtp[6193]: connect to mxs.mail.ru[94.100.180.31]:25: Connection timed out
Oct 17 16:42:33 server postfix/smtp[6193]: connect to mxs.mail.ru[94.100.180.104]:25: Connection timed out
Oct 17 16:42:33 server postfix/smtp[6193]: D20FB8455CC: to=<myemail@mail.ru>, relay=none, delay=139, delays=79/0.01/60/0, dsn=4.4.1, status=deferred (connect to mxs.mail.ru[94.100.180.104]:25: Connection timed out)
а вот это выдал journalctl:
окт 17 17:20:11 SRV-T-APP-028 postfix/qmgr[6166]: D20FB8455CC: from=<test@mail.test>, size=332, nrcpt=1 (queue active)
окт 17 17:20:42 SRV-T-APP-028 postfix/smtp[6290]: connect to mxs.mail.ru[94.100.180.104]:25: Connection timed out