Author Topic: Port 25 closed for outgoing emails  (Read 225 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Port 25 closed for outgoing emails
« on: July 27, 2024, 04:44:06 AM »
Hi and thanks for letting me post here

I have an issue with my 2 servers using Alma Linux, just today they starting to face this problem at the same time, and I dont know if it was because an update or any other change that I could see, port 25 is closed just for outgoing emails, and I verify if is closed with my ISP but is not, they confirmed that is open for in and outgoing service.

I did a telnet to smtp-mail.outlook.com and smtp.gmail.com to port 25 and can connect with any problems but if i do a telnet to any other server it cannot connect.

I checked the firewall and iptables and the port 25 is open, I can recibe emails but not send and I get this bounce email:

Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.25 [2602:ff16:12:0:1:17e:0:1] The IP address
sending this message does 550-5.7.25 not have a PTR record setup, or the
corresponding forward DNS entry 550-5.7.25 does not match the sending IP.
As a policy, Gmail does not accept 550-5.7.25 messages from IPs with
missing PTR records. For more information, go 550-5.7.25 to 550-5.7.25
https://support.google.com/a?p=sender-guidelines-ip 550-5.7.25 To learn
more about Gmail requirements for bulk senders, visit 550 5.7.25
https://support.google.com/a?p=sender-guidelines.
6a1803df08f44-6bb3fb1da25si54344036d6.586 - gsmtp

I get a lot of this type of logs in mail log

Jul 26 22:28:20 vps3 postfix/smtp[54894]: connect to outlook-com.olc.protection.outlook.com[52.101.73.20]:25: Connection timed out
Jul 26 22:28:20 vps3 postfix/smtp[54892]: B824DA0FF3: to=, relay=none, delay=19788, delays=19668/0.06/120/0, dsn=4.4.1, status=deferred (connect to usb-smtp-inbound-2.mimecast.com[170.10.150.242]:25: Connection timed out)
Jul 26 22:28:20 vps3 postfix/smtp[54894]: 29AE4A0FEA: to=, relay=none, delay=20018, delays=19897/0.03/120/0, dsn=4.4.1, status=deferred (connect to outlook-com.olc.protection.outlook.com[52.101.73.20]:25: Connection timed out)
Jul 26 22:28:20 vps3 postfix/smtp[54892]: B824DA0FF3: to=, relay=none, delay=19788, delays=19668/0.06/120/0, dsn=4.4.1, status=deferred (connect to usb-smtp-inbound-2.mimecast.com[170.10.150.242]:25: Connection timed out)
Jul 26 22:28:34 vps3 postfix/smtpd[55282]: connect from localhost[127.0.0.1]
Jul 26 22:28:34 vps3 postfix/smtpd[55282]: disconnect from localhost[127.0.0.1] ehlo=1 quit=1 commands=2

I tried to do all I could but no success.

« Last Edit: July 27, 2024, 04:48:56 AM by luislegacwp23 »

Offline
*****
Re: Port 25 closed for outgoing emails
« Reply #1 on: July 27, 2024, 06:06:39 AM »
Back in February 2023, Google required DKIM, SPF, PTR.

See: https://support.google.com/a/answer/14229414?hl=en

Your upstream also could have closed port 25 for various reasons.
Most providers have that port closed by default due to spammers.

You error tells you the problem, "corresponding forward DNS entry 550-5.7.25 does not match the sending IP."

This is usually, but not always a spammer who found & is using an open relay, and since CWP by default has SMTP relay disabled, them you need to check your PTR record for your base IP, to make sure it matches the hostname.

And again, make sure your sending domain has all the required DNS entries.