5 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] parsing mail with a s...
FromSent OnAttachments
ke...@pcintelligent.comMar 5, 2003 6:34 am 
Gregor LawatscheckMar 5, 2003 7:23 am 
ke...@refriedgeeks.comMar 5, 2003 9:55 am 
Gregor LawatscheckMar 5, 2003 10:51 am 
ke...@refriedgeeks.comMar 5, 2003 9:37 pm 
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] parsing mail with a scriptActions...
From:Gregor Lawatscheck (gp@mpex.net)
Date:Mar 5, 2003 7:23:57 am
List:net.sourceforge.lists.courier-maildrop

At 14:37 05/03/2003, you wrote:

Hi there,

I have set up Qmail + Courier IMAP/POP + Maildrop on my new system. I couldn't be happier with it. I have one question however. I would like to pipe an email through a program rather than sending it to a mailbox and I am not sure how to do that. I can pipe it to a program via .qmail files however the email is not passed via STDIN as I thought. I have no idea where it is.

So how can I get the email sent to script for parsing???

I am of course using maildrop to deliver, my qmail rc file looks like this.

exec env - PATH="/var/qmail/bin:$PATH" qmail-start '|preline maildrop' splogger qmail

You could do it inside the maildrop with xfilter (i.e. xfilter "/bin/anyprogram") or by setting up a variable and executing it with backticks ` ` (i.e. VHOME=`/bin/anyprogram -d $EXT@$HOST` ).

So I think that at the point the .qmail file is read maildrop is in charge, correct me if I am wrong.

Yes. You could extend your command in qmail rc to "|preline anyprogram maildrop" but this assumes that the message is piped through (i.e. coming in and going out).

What I would really love something like a flow chart showing me what happens when the mail comes in and how it is passed from qmail to maildrop.

Have a look at http://www.nrg4u.com/ "The big qmail picture" -- maildrop would be right at the end of the local delivery chain between qmail-local and maildir delivery, because you set maildrop as default delivery.

- Gregor