3 Apr, 2008  |  Posted by Danesh  |  in HowTo, Linux

Developers in my office constantly complain that the SMTP server is down and no mails are being sent out. We come back saying that their application is buggy. Most often after hours of troubleshooting the problem will turn out to be the application itself.

Here’s a simple way to test your SMTP server over port 25 using Telnet to proof them wrong.

Telnet to the server via port 25.

1. Key in “EHLO example.com” and hit enter.

2. Key in “MAIL FROM: sender@domain.com” and hit enter.

3. Key in “RCPT TO: recipient@domain.com” and hit enter.

4. Key in “DATA” and hit enter.

5. Key in your message body and hit enter.

6. Key in ” . ” and press enter.

If you received the mail then your SMTP is working fine.

Sample output,
Continue Reading ->

10 Dec, 2007  |  Posted by Danesh  |  in Linux

I had to work with an AIX box today which was having some issues with the mailq getting filled up frequently. The issue was not with the AIX box but the out SMTP box. Damn those spammers!!

Anyway, I had to restart the sendmail daemon on the AIX box. Walk through below,

1. Verify if sendmail is running. “ps -ef | grep sendmail“.

This should show: root 5704 1 0 11:08:42 - 0:00 sendmail: accepting connections on port 25

2. Stop sendmail. “stopsrc -s sendmail” or “kill -1 `cat /etc/senamail.pid`.

3. Verify if sendmail is running. “ps -ef | grep sendmail“.

No process should be returned.

4. Start sendmail. “startsrc -s sendmail -a “-bd -q30m”“.

-bd will start the sendmail as a SMTP mail relay router.

-q will the the interval in which the sendmail daemon will process save messages. If none is provided the daemon will default to instant processing.

5. Verify if sendmail is running. “ps -ef | grep sendmail“.

This should show: root 5704 1 0 11:30:23 - 0:00 sendmail: accepting connections on port 25