So Im finishing up my MD setup. I want clean mail delivered to my local user 
account, Spam I want sent to another alternate local user account. So instead 
of quarantine, the spam goes to a dedicated spam account where I can check it 
manually every once in a awhile. So my MD filter code looks like this:


            $SpamBox = 'essenz_spam@localhost';

            if ($hits < $req) {
                action_change_header("X-NoSpam-Score", "$hits ($score) $names");
            }
            if ($hits >= $req) {
                action_change_header("X-Spam-Score", "$hits ($score) $names");
                resend_message($SpamBox);
                action_discard();
            } 


The resend_message puts the spam in Sendmail’s clientmqueue, but…. 5 mins later 
when the queue flushes, the “resent” message gets delivered, which means it 
goes through MD again, which in turn gets filtered again by MD, resulting in a 
loop because it keeps getting flagged as spam then resent again.

Whats the easiest way to avoid this loop? Is there a way to put the message 
directly into the alternate mailbox (maybe add_recipient then 
delete_recipient)? The obvious option is I can add a snippet of code to MD to 
catch the loop and not perform a spam check on anything going to that alternate 
box.

Thanks
John
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to