procmail
[Top] [All Lists]

qmail-local supplies some environmental vbles

2001-10-19 01:40:36
In
http://www.xray.mpe.mpg.de/mailing-lists/procmail/2001-10/msg00175.html
DAvid Tamkin said:

[A] shell forked by qmail to run a command in a .qmail file
wouldn't know the recipient's login environment (shells forked
by other MTAs to run a command in a .forward file don't
either).  That's one of the reasons that procmail takes
variable assignments on its command line.

But according to the qmail documentation on qmail-command,

qmail-local supplies several useful environment variables to
command.  WARNING: These environment variables are not quoted.
They may contain special characters.  They are under the control
of a possibly malicious remote user.  SENDER is the envelope
sender address.  NEWSENDER is the forwarding envelope sender
address, as described in dot- qmail(5).  RECIPIENT is the
envelope recipient address, local(_at_)domain(_dot_)  USER is user.  HOME is
your home directory, homedir.  HOST is the domain part of the
recipient address.  LOCAL is the local part.  EXT is the address
extension, ext.

My question is a Smartlist one. I want every email that comes to
the many student lists I have to be logged in one central log
file. I have in .qmail-[listname], 

| preline $HOME/bin/procmail -m .procmaillogrc

and in .procmaillogrc, after the usual logging lines, I have

:0
* ^TOpenpals-\/[^(_at_)]*
| flist $MATCH

but I wonder whether it is better to just use the .procmaillogrc
for logging and to pass the email directly to flist with a second
line in the dot-qmail files like this:

| preline $HOME/.bin/flist [listname]

-- 
Greg Matheson                    Teaching: computer programming
Chinmin College                  done by monkeys.

Taiwan Penpals Archive <URL: http://netcity.hinet.net/kurage>
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>