Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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=<no-reply@galapagosmarketing.com>, size=612, class=0, nrcpts=1, msgid=<1289340743.4cd9c747240fa@coupon.dev.galapagos.office>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
Nov  9 17:12:24 gob sm-mta[6695]: oA9MCN6H006693: to=<jason.swett@gmail.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120612, relay=gmail-smtp-in.l.google.com. [74.125.95.27], 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 [127.0.0.1] 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

1 Answer 1

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

 
discard

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.