[PLUG] Using variables for procmail matches

Bill Thoen bthoen at gisnet.com
Fri Jan 7 00:27:17 UTC 2005


On Thu, 6 Jan 2005, AthlonRob wrote:

> On Thu, 2005-01-06 at 15:23 -0800, Rich Shepard wrote:
> >    The metacharacter '.*' should match 0 or more of anything. I'd try:
> >                                     p[.*]ll
> 
> That will catch pull, poll, pll, pall, pyll, powerfull, etc.... 
> 
> Is that what's wanted?

Actually no. I'm trying to use a variable because I'd rather not hard code
the test string for every occurrence of 'i' spelled sideways, or e (as in
[e3]) or 'o' (as in [o0].)  The reason I'd like to do this with a variable
is so I can change the string easily from one place should I want to...  
and it's less to type if I can get it to work. For example, if I have
variables like:

I_=[i1jl:\!|]
A_=[a at 4]

Then I can use filters like v${I_}${A_}gr${A_}, or even
v.?${I_}.?${A_}.?g.?r.?${A_}, and catch every madly spelled reference to
the little blue quicker dicker upper so I can trash the message
automatically. I don't want to filter too loosely like ".*" would
(although that would work, it would literally be throwing the baby out
with the bath water.)

But I'm not even sure if Procmail allows variable expansion in the match
conditions. Like I said, I've searched and found no reference to that, but
as the lawyers say, "Absence of evidence is not evidence of absence."

- Bill Thoen





More information about the PLUG mailing list