procmail
[Top] [All Lists]

dmail, mbx format, w flag, and understanding deliveredness

2003-01-05 19:41:52
I'm using procmail and dmail to deliver mail to mbx files.

Most of the examples I found on the web are of the form:

:0
| dmail +mboxname

When using that form, how does procmail know that the message was successfully delivered?

I see more instances of that example in the list archive. Then Philip Guenther writes

procmail does not support direct delivery to mbx format mailboxes.
If you have "dmail" installed, then the following will work to deliver
to a folder named "foo":

        :0 w
        * conditions here...
        | dmail +foo

If this is the last recipe in the rcfile, such that you want procmail
to bounce the message back if the dmail command fails, then you should
do something like:


        # Deliver to "real-mbox" folder
        :0 w
        | dmail +real-mbox

        # Pass on dmail's exit code
        EXITCODE = $?

        # Force procmail to give up delivering the message instead of
        # implicitly delivering to the compiled in spool.
        HOST

Is it simply the case that all of the other examples are wrong, and these people are playing fast and loose and are going to get burned someday (or already are)?

Related to Philip's example above is another question.

The procmail FAQ says:

Basically, Procmail will keep going until a recipe with a "delivering" action is successfully executed. Then Procmail considers its job done. The definition of "deliveredness" is explicated in the manuals, but it more or less amounts to having a message (successfully) saved to a file, forwarded to another address, or written to a pipeline.

So the normal flow is if a recipe which delivers to a mailbox or a pipeline fails, procmail just goes on to the next recipe and eventually to DEFAULT, and if you want to force it to exit, you can optionally set the EXITCODE and force a HOST mismatch to bail?

Thanks,
Jim


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • dmail, mbx format, w flag, and understanding deliveredness, Jim Correia <=