[PLUG] Using variables for procmail matches
Bill Thoen
bthoen at gisnet.com
Thu Jan 6 23:34:49 UTC 2005
I'm trying to get a Procmail recipe to use a variable in the match
expression, but I can't seem too get it to expand correctly. It works with
egrep (which is what I thought Procmail uses), but I can't make it work in
Procmail. Here's a short example:
# This recipe is supposed to catch any mail that has the string "pills"
# in it, with the 'i' spelled in any one of the spammish variations.
FILT_=[i1jl:\!|]
:0:
* 1^0 HB ?? p${FILT_}lls
TESTFOLDER
But it doesn't seem to work. It appears that it is comparing against the
literal string "p{FILT_}lls", not the string "p[i1jl:\!|]lls"
This doesn't work either:
FILT=p[i1jl:\!|]lls
:0B:
* $FILT_
TESTFOLDER
How do I get it to expand that FILT_ variable?
I've searched the man pages (procmailrc, procmailsc, procmailex, etc.) and
tried various combinations of "procmail match variables" on Google, but I
think I don't know how to search for this because I don't know the
terminology.
I'm using Procmail 3.22 on RH 9.
Can anyone here help?
TIA,
- Bill Thoen
More information about the PLUG
mailing list