5 messages in net.sourceforge.lists.courier-maildrop[maildropl] parsing mail with a script
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:[maildropl] parsing mail with a scriptActions...
From:ke...@pcintelligent.com (ke@pcintelligent.com)
Date:Mar 5, 2003 6:34:58 am
List:net.sourceforge.lists.courier-maildrop

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. Here it the script I wrote.

-------------------------------------------------------- $email=<STDIN>; open(FILE, ">/tmp/test.email"); $numArgs = $#ARGV + 1; print FILE "thanks, you gave me $numArgs command-line arguments.\n"; print FILE $email; close(FILE);

-------------------------------------------- This is what is outputs.

--------------------------------------------- thanks, you gave me 0 command-line arguments. Received: (qmail 13531 invoked from network); 5 Mar 2003 05:53:41 -0000

--------------------------------------------------------------

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

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

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.

Thanks Ken