procmail
[Top] [All Lists]

Re: $ condition question

1999-10-18 02:47:11
On Sat, 16 Oct 1999, Philip Guenther wrote:

pg>     * ^From:.*$ADDR
pg> 
pg> because procmail will interpret that dollarsign as a regexp dollarsign
pg> to be matched against the end of a line.  You have to tell procmail that
pg> you want variables to be expanded:
pg> 
pg>     * $ ^From:.*$ADDR
pg> 
pg> If ADDR contained "guenther(_at_)gac(_dot_)edu", then the above condition 
would be
pg> reread as
pg> 
pg>     ^From:(_dot_)*guenther(_at_)gac(_dot_)edu
pg> 

  Ok, now that makes sense. So the $ sign tells the rule that the $ signs
that follow are for variables, not new lines. Thanks, that helps.

pg> I think this is described in most of the FAQ files for procmail availible
pg> on the net.  You should probably scan through one or more of them as
pg> there's all sorts of useful bits in them.  Here's a link to one such FAQ:
pg> 
pg>     http://www.iki.fi/~era/procmail/mini-faq.html
pg> 
pg> 
pg> Philip Guenther
pg> 

-- 
     S.Toms - tomas(_at_)primenet(_dot_)com - http://www.primenet.com/~tomas
                   SuSE Linux v6.2+ - Kernel 2.2.11

Aleph-null bottles of beer on the wall,
Aleph-null bottles of beer,
        You take one down, and pass it around,
Aleph-null bottles of beer on the wall.

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