I think you are missing the point. I'm not looking at the
exit code. Let me be specific. I was using a Java transport class
that was not properly written. I would send a message with this class
and the class would say the message was sent. However, in reality,
smtpd would reject the message.
To debug the problem I used recordio. I noticed that the
class was not reading any output from smptd. It just stuffed the
whole message into smptd and exited. So, I modified the class to
read input and check for +OK and -ERROR.
I recorded an entire session where every response from smptd
was +OK, BUT the mail was never delivered. By pouring through the
logs, I noticed that when there was an exit code of 256, the mail
was not delivered. When the exit code was 0, the mail was delivered.
Somewhere during this whole process, I saw the message about bad
cr/lf. Once I fixed that problem, everything started to work.
So, the point here is that smtpd responded with +OK for everything,
leading me to believe the mail had been accepted and was delivered.
However, the mail *never* showed up in the queue. The qmail log was
blank and the smtpd log showed an exit code of 256.
> This stuff is pretty much irrelevant. You can't expect to check the status
> of which messages were accepted successfully by looking at the exit code.
> SMTP allows for the transfer of more than one message and for messages
> to be resent after some failure in the same session. So a single exit code
> can't tell you all of what you need to know. The data command will return a
> success code if the message was successfully accepted. This is what needs to
> be checked.
--
+-------------------------------------------------------------------+
+ Thomas M. Sasala, Electrical Engineer [EMAIL PROTECTED] +
+ MRJ Technology Solutions http://www.mrj.com +
+ 10461 White Granite Drive, Suite 102 (W)(703)277-1714 +
+ Oakton, VA 22124 (F)(703)277-1702 +
+-------------------------------------------------------------------+