procmail
[Top] [All Lists]

Re: Need a formula for forwarding and rejecting email from lists

2006-07-09 10:21:08
On 7/9/06, $Bill Luebkert <dbecoll(_at_)adelphia(_dot_)net> wrote:
:0
* BAD ?? ^[a-zA-Z].*@
{
        EXITCODE=67
        :0
        ! $BAD
}

To drop the forwarding on the bad, can I just drop the {} grouping and
just use the EXITCODE=67 (when I feel it's all working well) ?

Not quite.  An ordinary assignment still isn't a valid action, unless
you're using the special =| syntax (see the "Recipe Action Line"
section of "man procmailrc").  So you need to keep the braces.  Then
if you actually want the message to be discarded, you either need to
deliver to /dev/null (as your original comments suggested) or you need
to force procmail to exit, the usual idiom for which is to employ a
side-effect of setting the HOST variable.  The latter actually causes
the current rc-file to terminate, not the entire processing, so
delivery to /dev/null is probably the way to go in this case.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail