procmail
[Top] [All Lists]

Q: using your own delivery program

1999-05-20 04:20:26

Let's say procmail is used as the local delivery agent, you have your
own program called "deliver-mail" that delivers mail in some special way,
and you want procmail to use this program for all final deliveries.

It seems correct to put this in the procmailrc file:

        :0
        | /bin/deliver-mail

But sometimes delivery might not succeed, so you want procmail to exit
with the same exit code as "deliver-mail" does, so that the MTA can
be told and requeue/bounce the message. This does not happen here,
procmail always returns 0.

So, how do you fix this? I can try the following, but this will also
involve the shell and looks awkward. Besides, procmail doesn't seem
to trest this as a delivering recipe anymore, it will deliver to
the system default mailbox.

        :0
        EXITCODE=| /bin/deliver-mail; echo $?

-- 
Gjermund Sorseth


<Prev in Thread] Current Thread [Next in Thread>