procmail
[Top] [All Lists]

Re: procmail recipe

2005-06-02 14:31:10
At 09:41 2005-06-02 -0400, Tim Macrina wrote:
I have a very simple recipe

Which is located WHERE? I'm guessing it is in the server /etc/procmailrc file rather than an individual user .procmailrc. If this is globally executed, what do you figure will happen when the /etc/procmailrc is run while processing mail for the spam recipient user? Procmail will attempt to forward it again. And again, and again.

:0
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
! someuser(_at_)mydomain(_dot_)com


Solutions:

Put in a specific exclusion for that spam recipient user (there's no need to forward to it if the mail is ALREADY being delivered to it). You might also consider skipping execution of your spam filters when it's being received by this (presumably non-public) account - why RE-FILTER each spam that's been forwarded to it?

:0
* ! LOGUSER ?? spamuser
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
! someuser(_at_)mydomain(_dot_)com


Another approach would be to store the message directly to a file. /etc/procmailrc an do that because it's running with elevated privledges, though if the mailbox file doesn't already exist, it'll try to create it with root owner perms. You could touch & chown the file if it doesn't exist. This approach has the benefit of not adding additional routing headers to the message, and instead storing it directly as received (and modified once by your spam filters). You also don't have to worry about loop conditions, though mailbox full could be an issue.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
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

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