Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a weird and frustrating problem. With identical code, I can send mail from one of my apps but not another. Here's /var/log/mail.log for the e-mail that works:

Nov  9 17:12:23 gob sm-mta[6693]: oA9MCN6H006693: from=<>, size=612, class=0, nrcpts=1, msgid=<>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain []
Nov  9 17:12:24 gob sm-mta[6695]: oA9MCN6H006693: to=<>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120612, [], dsn=2.0.0, stat=Sent (OK 1289340744 ga18si18104172ibb.16)

And here's the log for the one that doesn't work:

Nov  9 17:13:03 gob sm-mta[6704]: oA9MD3dp006704: localhost.localdomain [] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4

Same machine, same code (at least for the e-mail sending part). I can't figure out why one works and the other one doesn't.

(P.S. There's some overlap, but I figure this is more of a sysadmin question that a programming question, plus the person who knows the answer is more likely to be here than at Stack Overflow.)

share|improve this question

Step back from the computer and take a break for 5 to 10 minutes. Come back and "make clean" / rebuild the second application, if it is a compiled one. If it is an interpreted one change the first print statement to print back at you something "welcome back from your break". I think you will find out that the code that gets executed is not what you edit / compile / think that is executed.

(BTW, it would have been more helpful if you stated whether your applications are (shell) scripts, compiled executables and how are you trying to send email: by connecting to port 25 of the mail server, by forking /bin/mail, etc.).

share|improve this answer
It's a PHP script and I'm sending the mail with Swift mailer. – Jason Swett Nov 10 '10 at 13:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.