Cannot send email

Hi All,
I have a problem, my axigen server cannot send emails.
receiving emails from outside is ok, i can receive emails from google, yahoo, and others.
But for outgoing emails, there is a problem. from the logs, when the server tries to connect to the destination server for delivering the message the connection time out error happen for all ports (25, 465,587).

2022-12-21 15:47:55.216 +0000 08 mail SMTP-OUT:0000000C: Relay mail 347BE9: unable to connect to 142.250.147.27:465: Connection timed out

I noticed that when the axigen try to get the destination server, it uses mx entry records retrieved from the DNS, and it’s wired that all servers retrieved from gmail for example doen’t have an opened SMTP port.

2022-12-21 16:12:00.702 +0000 08 mail DNR:00091EEE: Search MX for 'gmail.com'
2022-12-21 16:12:00.702 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:00.812 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:00.983 +0000 08 mail DNR:00091EEE: 'alt3.gmail-smtp-in.l.google.com' found MX '142.250.150.27' with priority 30
2022-12-21 16:12:00.983 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.153 +0000 08 mail DNR:00091EEE: 'alt3.gmail-smtp-in.l.google.com' found MX '2a00:1450:4010:c1c::1b' with priority 30
2022-12-21 16:12:01.153 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.323 +0000 08 mail DNR:00091EEE: 'alt1.gmail-smtp-in.l.google.com' found MX '142.250.153.26' with priority 10
2022-12-21 16:12:01.323 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.481 +0000 08 mail DNR:00091EEE: 'alt1.gmail-smtp-in.l.google.com' found MX '2a00:1450:4013:c16::1a' with priority 10
2022-12-21 16:12:01.481 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.642 +0000 08 mail DNR:00091EEE: 'alt2.gmail-smtp-in.l.google.com' found MX '142.250.147.26' with priority 20
2022-12-21 16:12:01.642 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.813 +0000 08 mail DNR:00091EEE: 'alt2.gmail-smtp-in.l.google.com' found MX '2a00:1450:4025:c01::1b' with priority 20
2022-12-21 16:12:01.813 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:01.984 +0000 08 mail DNR:00091EEE: 'gmail-smtp-in.l.google.com' found MX '74.125.206.26' with priority 5
2022-12-21 16:12:01.984 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:02.141 +0000 08 mail DNR:00091EEE: 'gmail-smtp-in.l.google.com' found MX '2a00:1450:400c:c04::1b' with priority 5
2022-12-21 16:12:02.141 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:02.312 +0000 08 mail DNR:00091EEE: 'alt4.gmail-smtp-in.l.google.com' found MX '74.125.200.27' with priority 40
2022-12-21 16:12:02.312 +0000 08 mail DNR:00091EEE: Sending query (1/1) to 8.8.8.8:53
2022-12-21 16:12:02.471 +0000 08 mail DNR:00091EEE: 'alt4.gmail-smtp-in.l.google.com' found MX '2404:6800:4003:c00::1a' with priority 40

if you check the ports of any of the servers listed in the log, you will not find any (25,465, or even 587 port.

I don’t understand how axigen can deliver the messages?
Is my configuration is wrong? Note: that the Option “Deliver using MX entry” is checked for outgoing delivery setting.

Thanks in advance for your help.

Regards,
Ateik

Hello Ateik,

Most probably your egress traffic for TCP sessions for port 25 is blocked by your ISP or the datacenter where your instance is running (this is the usual setup in order to limit the proliferation of mail servers used for sending spam).

For example, if I checked from my home (where my ISP is permitting such sessions) I could see that the Gmail servers are responding fine on port 25:

$ telnet 142.250.150.27 25
Trying 142.250.150.27...
Connected to 142.250.150.27.
Escape character is '^]'.
220 mx.google.com ESMTP l10-20020a2e868a000000b0026fdb851000si6903194lji.220 - gsmtp
ehlo test
250-mx.google.com at your service, [8a.2b.2c.1d]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
quit
221 2.0.0 closing connection l10-20020a2e868a000000b0026fdb851000si6903194lji.220 - gsmtp
Connection closed by foreign host.

So my recommendation is to find the right way to unblock your TCP sessions to “internet” on port 25 - but maybe you will be out of luck as some Cloud providers are not allowing such exceptions.

Also be aware that in order to send via MX records you will need to send on port 25. Other ports (like 465 and 587) are not supposed to be used for message delivery between email servers but for hosted accounts authentications purposes.

HTH,
Ioan

1 Like

Thank you Ioan. I suspect that my ISP is blocking 25 port. but when I called them they said they don’t block any port for my hosting plan. I’m sure now they blocked the port 25.

Thank you so much.

King Regards,
Ateik

Hello Ateik,

If you could test from your own server console with the same telnet command you will have some evidence to share to your ISP (if needed).

BR,
Ioan

Hi Ioan,
Thank you, I already did that.
I used telnet command from a machine hosted in our main Data Center, and the connection is success. I will shared the response with them as you suggested.
Thank you again.