procmail
[Top] [All Lists]

Re: Q: Putting action line in variable

1997-08-09 13:00:00
Gregory Sutter writes:

I want to put the entire action line for a set of recipes in a variable,
as:
========

# This sets the default action for all recipes in this base junkfilter
# file.
ACTION="|formail -i 'X-Fkey: junk' -i 'X-Spammer: `echo $SPAMMER`' >> 
jmtest"

# then various recipes...

# junk mail software.
SPAMMER="junkmail software"
:0 :
* ^Received:.*(Cyber-Bomber|bulk_mailer|from stealth)
$ACTION

# IEMMC does NOT keep and use a "remove list".  
SPAMMER="IEMMC"
:0 :
* X-Advertisement:.*iemmc
$ACTION

==========

etc...

Does anyone know a way to do this?  The above solution is broken.

 I tried that too, once, and it wouldn't work ...
 But you could put the action line into a separate file and INCLUDERC
 it where appropriate.


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