procmail
[Top] [All Lists]

Re: substitutions?

1998-03-14 15:28:36
Steve Glines <sglines(_at_)world(_dot_)std(_dot_)com> writes:
I have a procmailrc file that goes like this:

:0:
*^From: $FROM
me(_at_)xxx(_dot_)com

I'm trying to call procmail with:

procmail -m FROM="aaa|bbb"

From my reading of the docs I should get substution as I would in a
shell but I'm not.

Variable interpolation is only done in condition if the condition has a
leading '$'.  This dollar sign is not counted as part of regexp.  Since
the interpolation is done before the regexp is parsed, you probably
want to enclose the variable in parens to avoid precedence problems.
Otherwise, the example you gave would result in all mail messages with
"bbb" in the header being filed to the "me(_at_)xxx(_dot_)com" mailbox.

        :0:
        * $ ^From: ($FROM)
        me(_at_)xxx(_dot_)com

(BTW: do you mean to forward the message to that address?  If so, you
left out the '!' at the beginning of the action which would tell
procmail that that is your intent.)


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • substitutions?, Steve Glines
    • Re: substitutions?, Philip Guenther <=