D
D
DVoropaev2017-10-17 17:13:27
Mail server
DVoropaev, 2017-10-17 17:13:27

Why is mail not coming with postfix?

Raised postfix on Centos.
I connect via telnet to port 25 and try to send an email:

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: [email protected]
250 2.1.0 Ok
rcpt to: [email protected]   
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.

The letter does not come, I try to do this:
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=<[email protected]>
Oct 17 16:41:33 server postfix/qmgr[6166]: D20FB8455CC: from=<[email protected]>, size=332, nrcpt=1 (queue active)

Yeah, so it's stuck in the queue, let's go there:
postqueue  -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------

D20FB8455CC      332 Tue Oct 17 16:40:14  [email protected]
             (connect to mxs.mail.ru[94.100.180.104]:25: Connection timed out)
                                         [email protected]

-- 1 Kbytes in 2 Requests.

I do postqueue -f, and look at the logs again:
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=<[email protected]>
Oct 17 16:41:33 server postfix/qmgr[6166]: D20FB8455CC: from=<[email protected]>, 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=<[email protected]>, 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)

and this is what journalctl outputted:
окт 17 17:20:11 SRV-T-APP-028 postfix/qmgr[6166]: D20FB8455CC: from=<[email protected]>, 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

Answer the question

In order to leave comments, you need to log in

4 answer(s)
T
TyzhSysAdmin, 2017-10-17
@POS_troi

Well, let's try
In the meantime, the logs clearly show that you have a problem in principle with connecting to the relay on the 25th port.
1. Prov blocks the 25th port
2. Your firewall blocks outgoing 25u
3. Your IP does not like soap.
In principle, an exhaustive list of possible options.
PS don't forget about SeLinux.

H
Hardoman, 2020-12-06
@Hardoman

This is not a problem with the firewall, otherwise there would be another whack.
https://help.mail.ru/notspam-support/errors/ipblock
Many have a problem sending to mail.ru
Some managed to solve the timeout problem like this:
/sbin/sysctl -w net.ipv4.tcp_mtu_probing = 1
If to others hosts are leaving, but mail.ru is not - then he banned you.
If it does not go to others, then the problem is in your config. The server does not know where to relay traffic to send it outside (setting mynetworks).
But in any case, as it was said, you need to make sure:
- that the ISP port 25 for the relay is not blocked
- That your server is not a banana from mail.ru (if anything, you can drag it on the application https://help.mail.ru /ennotspam-support/ip_block )

P
Puma Thailand, 2017-10-17
@opium

Either the firewall or mail banned you

A
athacker, 2017-10-17
@athacker

Are entornnets available from the server at all? ping mxs.mail.ru passes?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question