At 15:07 2003-03-31 +0530, jaigopal wrote:
How can i execute a perl script every time my global procmailrc is
invoked ?
Condition? Filter? Delivery? Just fer the heck of it?
The syntaxes vary. They are documented in the manpages.
One thing to note is that not every user has a SHELL, and the global
procmailrc (/etc/procmailrc) runs with the user's SHELL defined. So, it's
a good idea to set and unset the shell:
# top of /etc/procmailrc
ORGSHELL=$SHELL
SHELL=/bin/sh
# do whatever
# bottom of /etc/procmailrc
SHELL=$ORGSHELL
ORGSHELL
As for "how do I...":
:0
* ? someprogram_which_could_be_a_perl_script_or_whatever args
VARIABLE=`someprog args`
:0h
VARIABLE=|someprog args
:0
* condition
| program_to_deliver_to
:0f
* condition
| program_to_filter_through
We could go on and on here, but I think some quality time with the manpages
may be in order (don't forget 'man procmailex'). Otherwise, further
explanation on your part of what it is you're trying to do, and under what
circumstances you'd be doing it is in order.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail