2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] exitcodes when maildr...
FromSent OnAttachments
Eric PerssonJan 5, 2004 3:24 am 
Devin RubiaJan 5, 2004 6:26 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] exitcodes when maildrop delivers?Actions...
From:Devin Rubia (dev@thezone.net)
Date:Jan 5, 2004 6:26:40 am
List:net.sourceforge.lists.courier-maildrop

On Mon, Jan 05, 2004 at 12:26:18PM +0100, Eric Persson wrote:

Hi,

I'm still poking around with the maildrop implementation I asked about earlier. It works as it is now, but I like to extend the whole setup with more features. :)

What I'm wondering, is the exitcodes that maildrop returns. Are they different depending on how the filtering goes. For example, is the return code different if the mail is delivered by to or not?

I didnt find anything about this in the man pages, any hints or directions?

$ man maildropfilter [SNIP] OTHER SPECIAL VARIABLES The following variables are automatically used by maildrop when the filter file is being processed:

EXITCODE Return code for maildrop. When maildrop successfully delivers a message, it terminates with this exit code, which defaults to 0. When the to or the cc command is used to deliver the message to an external process, via a pipe, maildrop will set this variable to the exit code of the external process. Since maildrop immedi- ately terminates after completing the to command this means that maildrop's exit code will be the exit code of the external process. If the to command does not deliver the message to a process you must set EXITCODE before the to command, since maildrop terminates immediately after finishing the delivery. [SNIP]

A quick perusal of the source shows that delivery failure will throw appropriate EXITCODEs, such as EX_NOUSER and EX_NOPERM when appropriate.