procmail
[Top] [All Lists]

Re: Processing Loop

2003-02-14 14:56:18
On 14 Feb, tmacmil wrote:
| Good day,
| Below is a copy of my current procmailrc file. I have a small problem with
| it in that it keeps processing some of the email repeatedly until in
| causes a to many hops error.
| [...]
| 
| ------procmailrc--------
| LOGFILE=/var/spoolbak/logs/procmail.log
| DROPPRIVS=yes
| 
| #:0
| #* 1^1 > 1
| #{
| #     LOG="$LOGFILE $=
| #"
| #}
| 
| :0fw
| * < 256000
|| /usr/local/bin/spamc -f
| 
| :0:
| * ^X-Spam-Status: Yes
| ! spamtrap(_at_)rivernet(_dot_)net
| #/var/spoolbak/logs/spammass/spam
| 
| 

The canonical way to prevent loops is to add an X-Loop: header on
messages that might loop (like, say, because they're be re-mailed), and
test for the same header on incoming messages.  The man pages have
explanations and examples of this usage.

Assuming all messages to spamtrap(_at_)rivernet(_dot_)net are spam that is 
relayed
in this fashion, then another obvious possibility is to check for
messages To: spamtrap(_at_)rivernet(_dot_)net at the top of the rcfile and 
deliver
them where they belong without subjecting them to the rest of the rfile.
Arguably, you'd want to do this for performance reasons anyway, even if
you do use an X-Loop: header - which you should.

Either choice requires nothing more than very elementary filters which
should be easily deducible from the man pages and with examples
abundantly available from the list archives.

-- 
Email address in From: header is valid  * but only for a couple of days *
This is my reluctant response to spammers' unrelenting address harvesting



_______________________________________________
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>