procmail
[Top] [All Lists]

Re: When are shell variables expanded?

1996-06-19 22:58:35

I'm having some trouble matching headers.  I add X-Loop: headers to my mail
so I know where it came from and so it doesn't get re-forwarded again and
again and ..., because I forward all mail from my work account to my
student account (w/ a modified subject) and all work-related mail (that
shouldn't be sent to my student account, but is) to work account.


:0 c
* !^X-Loop: $HERE
not_here

This recipe doesn't work.  It should always fail (because I just added the
X-Loop header -- and it is there), yet it always matches.  From the logfile
w/ VERBOSE=on:

Sigh.  Whenever you use a variable in a procmail regexp condition, always
prefix the condition with a '$'.  The recipe should look like this:

    :0
    * $!^X-Loop: $HERE

See the man page for "procmailrc".

<Prev in Thread] Current Thread [Next in Thread>
  • When are shell variables expanded?, Ray DeGennaro (@Home via Eudora)
    • Re: When are shell variables expanded?, Alan Stebbens <stebbens(_at_)anywhere(_dot_)engr(_dot_)sgi(_dot_)com> <=