How To Troubleshoot & Check Email Server SMTP Port 25

HOW TO TROUBLESHOOT AND CHECK IF EMAIL SERVER SMTP PORT 25 IS OPEN?

A while ago we had issues with our ChicagoVPS’s VPS server instance and completely blocked SMTP Port 25 email traffic. After checking all relevant server config files and verifying that POSTFIX service is indeed up & running, there was only one thing left to do.

Email Server Artwork

Email Server Artwork

First, let’s describe in brief how did we troubleshoot our email sending issue: Looking into our mail.log inside /var/log/ directory, there were a lot of timeout errors, that we’ve never seen before, for example:

*** EXCERPT FROM mail.log ***

Mar 5 09:30:58 server postfix/smtp[1303]: connect to gmail-smtp-in.l.google.com[173.194.204.26]:25: Connection timed out
Mar 5 09:31:28 server postfix/smtp[1303]: connect to alt1.gmail-smtp-in.l.google.com[64.233.186.26]:25: Connection timed out
Mar 5 09:31:59 server postfix/smtp[1303]: connect to alt1.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1b]:25: Connection timed out
Mar 5 09:32:29 server postfix/smtp[1303]: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400b:c02::1b]:25: Connection timed out

Again, useful command to check if POSTFIX service is actually running under Ubuntu server:

service postfix status

Rebooting entire VPS server, or restarting POSTFIX service didn’t help. Email queue & reported timeout errors were ever growing, which you can check with a simple command inside SSH Terminal:

mailq [ENTER]

We have even tried to manually send a test email from the SSH console (terminal), using this simple command:

echo “Test” | mail -s “Test message” youremailaddress@domain.com

Nothing. Complete silence.

Finally, we ran a traceroute command to make sure that our server is actually reaching the outside world, using this simple command to Google Gmail SMTP server route:

traceroute -n -T -p 25 gmail-smtp-in.l.google.com

And, much to our surprise, it revealed the true problem:

root@server:~# traceroute -n -T -p 25 gmail-smtp-in.l.google.com
traceroute to gmail-smtp-in.l.google.com (173.194.204.27), 30 hops max, 60 byte packets
1 192.210.145.2 0.033 ms 0.012 ms 0.011 ms
2 * * *
3 * * *
4 * * *
5 * * *
.
.
.
30 * * *

Our server’s IP was blocked either by ChicagoVPS itself, or by their upstream provider. Our emails never got a chance of coming through.

For a reference, here is an example of a properly executed (completed) traceroute command:

root@server:~# traceroute -n -T -p 25 gmail-smtp-in.l.google.com
traceroute to gmail-smtp-in.l.google.com (173.194.204.27), 30 hops max, 60 byte packets
1 192.210.145.2 0.035 ms 0.010 ms 0.010 ms
2 10.8.43.41 0.720 ms 0.777 ms 0.768 ms
3 10.8.43.13 0.135 ms 0.171 ms 10.8.43.9 0.162 ms
4 10.8.32.57 0.219 ms 0.256 ms 0.292 ms
5 207.86.156.57 0.283 ms 0.281 ms 0.300 ms
6 216.156.0.249 11.581 ms 11.540 ms 11.512 ms
7 207.88.12.104 9.946 ms 10.042 ms 10.026 ms
8 207.88.13.35 15.499 ms 10.202 ms 10.232 ms
9 205.197.230.38 9.998 ms 9.983 ms 10.000 ms
10 209.85.255.68 16.910 ms 216.239.50.106 10.565 ms 209.85.255.68 16.531 ms
11 209.85.252.242 15.571 ms 72.14.236.208 16.012 ms 209.85.246.4 16.274 ms
12 209.85.143.120 27.636 ms 216.239.40.164 16.348 ms 216.239.40.160 16.767 ms
13 216.239.48.160 24.138 ms 64.233.174.11 23.743 ms 23.589 ms
14 66.249.94.59 23.452 ms 209.85.252.69 24.042 ms 216.239.49.253 24.231 ms
15 * * *
16 173.194.204.27 23.772 ms 24.005 ms 29.472 ms

Well, at least we re-assured ourselves that nothing was wrong with the server configuration in any way, and as already described in our ChicagoVPS Review, the problem was solved after 7 days, after countless tech support exchange and proofs from our side that our server and it’s IP, as well as websites hosted on it are not used for any malicious activities whatsoever, and that all our sites use proper email traffic authentication (SPF) records.

 

Categories
Web Hosting

Comments


Post A Comment

I have read and consent to Privacy Policy and Terms and Conditions