procmail
[Top] [All Lists]

Re: Doing 2 things in one recipe

2001-05-31 15:24:08
I've got a .procmailrc with a couple of sections in it which generate
automatic replies, somewhat like this (but with more subject and
address regexes:

# stuff I don't even want to hear about. Bounce
:0c:
* ^Subject:.*fe*project.* | \
  ^To:(_dot_)*spam(_at_)s\(_dot_)patterson\(_dot_)freeuk\(_dot_)com | \
  ^Subject:.*VMware Newsletter.* | \

I don't think these regular expressions are doing what you think they are
doing. Are you sure you want "fe*project" and not "fe.*project"? Also, you
shouldn't have spaces before the vertical bars. I would suggest changing this
condition to:

* ^Subject:.*(fe*project|VMware 
Newsletter)|^TO_spam(_at_)s\(_dot_)patterson\(_dot_)freeuk\(_dot_)com

| (formail -brt ; \
echo "Returned mail: User unknown."; \
echo "Your message was sent to someone who does not have an " ; \
echo "acount at this server." ;\
) | $SENDMAIL -oi -t
/dev/null

A recipe cannot have two actions like this. Delete the line that says
"/dev/null".

I'd like to have the original message dropped into /dev/null without
having to duplicate all the spam matching regexes, the code above
works except for filtering messahes away to /dev/null.

Anyone know what I'm missing?

Yeah, just remove the "c" flag from the recipe. The recipe is then considered
to be delivered and no more processing is done.

Hope this helps,
Ed
_______________________________________________
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>
  • Re: Doing 2 things in one recipe, Edward J. Sabol <=