3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Maildrop & interfaces...
FromSent OnAttachments
Jeff RiceApr 9, 2006 7:09 am 
Sam VarshavchikApr 9, 2006 7:17 am 
Devin RubiaApr 10, 2006 6:23 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] Maildrop & interfaces to external filtersActions...
From:Devin Rubia (dev@thezone.net)
Date:Apr 10, 2006 6:23:17 am
List:net.sourceforge.lists.courier-maildrop

On Sun, Apr 09, 2006 at 08:09:19AM -0600, Jeff Rice wrote:

So. Why is there no facility in Maildrop to interface with external programs where either their exitcode returns a useful, non-zero number or where their stdout contains filter information but not the message itself. Procmail has this, and I have found it very useful. Wouldn't it be a logical addition to put this functionality into Maildrop?

Please consider giving us an option where a message is piped to an external filter but where stdout is not expected to be the message but rather a report on the filter results, and where the exitcode can be non-zero and used for filtering decisions. Given the fact that a Google search reveals several "wrappers" people have made for external filters (for example, http://www.hodgman.org/dick/linux/configure-dcc-for-maildrop.html for DCC), I don't think I am the only one who would appreciate this.

$ man maildropfilter [SNIP] COMMAND SUBSTITUTION Text enclosed in back-tick characters is interpreted as a shell command. The shell command is executed as a child pro- cess by maildrop. Its output is used in place of the command. For example:

DIR=`ls` places the names of the files in the current directory into the DIR variable.

The output of the command will have all newline characters replaced by spaces, and leading and trailing spaces will be stripped (multiple spaces are not removed, though). Also, the contents of the message being delivered is made avail- able to the command on standard input. [SNIP] and [SNIP] RETURNCODE This variable is set when maildrop runs the xfilter command, or a command that's specified within a pair of backtick characters ( command substitution ). The RETURNCODE variable will be set to the exit code of the command, after it completes. [SNIP]

What's the problem? Looks like everything you need is there.