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