Mark Stosberg <mark=WmyhgDpj2fCHT8/[EMAIL PROTECTED]> writes:

> I recently made a mis-configuration with TMDA that resulted in lost
> mail. I'm interested to know TMDA might be able to fail more gracefully
> in this situation.

TMDA does fail gracefully.  Whenever it encounters a problem like you
described, it writes the explanation to the debug log and it returns
an error code to the calling program, which is usually the MTA's
delivery agent (qmail-local, in the case of qmail).  This error code
causes the MTA to "defer" the message, leaving it in the queue so that
delivery will be attempted again, after you have a chance to fix the
problem.

> I'm using TMDA from within Procmail. The documentation states that for
> this setup, the "-p" needs to be used with procmail. This flag Preserves
> some environment variables that TMDA needs.

Procmail has the unfortunate and annoying "feature" of blissfully
ignoring error return codes from programs that it runs.  What this
means is you must put special code in your .procmailrc to handle
non-zero exit codes.  Specifically, you absolutely must set EXITCODE
in order for procmail to return anything but 0.  If you set EXITCODE
and then cause procmail to exit, the value of EXITCODE will be
returned to the delivery agent and all will be well.


Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to