procmail
[Top] [All Lists]

Re: grep addresses from flat file

2002-05-20 02:14:14
Paul Chvostek <paul(_at_)it(_dot_)ca> writes:
...
:0:
* ^From: \/.+
* ?$ echo "$MATCH" | /usr/bin/grep -qf /path/to/badfromlist
$SPAM

The first '$' may be redundant, depending on your SHELLMETAS.

Actually, the '$' right after the '?' will break the recipe.  Everything
after the '?' is passed directly to the shell (because it contains a
'|', a character from SHELLMETAS) and the shell will try to execute a
program name '$'.

Also, supplying full paths for programs tends to cause more problems
than it solves, so:

        :0:
        * ^From: \/.+
        * ? echo "$MATCH" | grep -qf /path/to/badfromlist
        $SPAM


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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