procmail
[Top] [All Lists]

Re: Matching on an arguement...

1997-07-23 16:24:00
Bob Snyder <rsnyder(_at_)advsys(_dot_)com> writes:
...
How do I set up a condition to match a variable? I'm trying to use the
sendmail 8 support for procmail, where username+whatever gets handed to
procmail as an arguement in $1. I'm not sure of the syntax of a rule to use
this information to sort email.

Can someone provide an example?

        # Copy the passed in value into a real variable
        ARG = $1

        # Match against that
        :0
        * ARG ?? ^^some-value^^
        ...more conditions followed by the action line

The "ARG ??" tell procmail to match against the value of the ARG
variable instead of the header of the message.  The double carets achor
the match to be the entire value, so that you don't match a little bit
inside of a longer value.


Philip Guenther

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