procmail
[Top] [All Lists]

Re: Setting up an includerc file

1998-10-07 21:51:06
Bob Brown wrote:

I've created a receipe that works pretty good, now I want to
modify it so that it can work in a generic case as an rc file.
  [...deletia...]
0:
* ^TOJohnDoe@
{
    various commands and tasks.....
}

What I want to do is call it by saying something like:

NAME="JohnDoe"  INCLUDERC=filename.rc

How do I generalize the to statement?

Try the following...

NAME="JohnDoe"

INCLUDERC=filename.rc

# Here's 'filename.rc'
0:
*$ ^TO.*${NAME}@
{
    various commands and tasks.....
}

 
Incidently, the receipe works well with email like
"JohnDoe(_at_)domain(_dot_)com" but fails when I have
"<JohnDoe(_at_)domain(_dot_)com>" or "'John Doe' 
<JohnDoe(_at_)domain(_dot_)com>"
  I'm stuck on that.  You might try changing my code above to

NAME=".*JohnDoe"

  It seems to malfunction when there is something preceeding
the actual email address.  Putting in the wildcard .* might
get past it.

-- 
Walter Dnes <waltdnes(_at_)interlog(_dot_)com> procmail spamfilter
http://www.interlog.com/~waltdnes/spamdunk/spamdunk.htm
Why a fiscal conservative opposes Toronto 2008 OWE-lympics
http://www.interlog.com/~waltdnes/owe-lympics/owe-lympics.htm