|
All about the system administration and application development behind a local linux-based company
It often comes up where I’ve got a mail delivery issue (user n can’t send email to domain n.com) and it’s difficult to troubleshoot just with the info in the logs. One thing that sometimes yields useful info is directly telnetting to port 25 of the offending mail server. This way if it’s rejecting messages you can see the exact reject message, or it could be violating the protocol in some creative way.
I just ran into a succinct protocol description at http://helpdesk.islandnet.com/pep/smtp.php
Here’s their transcipt of a successful SMTP session. Be sure to notice the excra line break between the end of the headers and the beginning of the body.
telnet mail.islandnet.com 25
220 Islandnet.com ESMTP server ready
helo a.b.c
250 mail.islandnet.com Hello x [YOUR_IP_ADDRESS]
mail from:
250is syntactically correct
rcpt to:
250verified
data
354 Enter message, ending with “.” on a line by itself
From: Bugs Bunny
To: Daffy Duck
Subject: Loony Toons!Hi there!
.
250 OK id=1778te-0009TT-00
quit
221 mail.islandnet.com closing connection
March 5th, 2008 at 4:42 am
Thank you for this, mate! Sometimes this really matters as undelivered mail is usually a headache for system administrators
March 9th, 2008 at 8:24 am
I couldn’t agree with you more Erek. I like the fact you executed a run and showed the output. It’s very helpful.
April 22nd, 2008 at 6:28 pm
Hi Erek,
Good tip. One thing to watch though is that a lot of ISPs now block outbound access to port 25 to prevent people running their own mail servers.
A real pain when you’re trying to troubleshoot problems from home! You can end up troubleshooting the wrong problem!
Regards - Matt