procmail
[Top] [All Lists]

Re: sending spam to /dev/null

2005-07-24 15:09:09
Damian Menscher:
Ruud H.G. van Tol:

 :0
 * ^X-Spam-Status: Yes\/.*
 {
   :0
   * MATCH ?? autolearn=spam
   /dev/null

   :0:
   junk
 }

Will that work if the autolearn is on a different line than the
X-Spam-Status: Yes line?  For example, your message came to me as:

X-Spam-Status: No, score=-2.4 required=5.0
     tests=AWL,BAYES_00,DRUGS_ERECTILE, SUBJECT_DRUG_GAP_VIA
autolearn=no version=3.0.4

Yes, header fields are unfolded before the recipe sees it, see 'man
procmail':

To  make  `egrepping' of headers more consistent, procmail concatenates
all continued header fields; but only internally.  When delivering  the
mail, line breaks will appear as before.


Alternative:

 :0   # 8 or more
 * ^X-Spam-Level: \*\*\*\*\*\*\*\*
 /dev/null

 :0:  # 5 or more
 * ^X-Spam-Level: \*\*\*\*\*
 junk

I don't recommend that, as the autolearn requirements are much more
strict than a simple scoring.  Also, it allows you to ensure you train
on EVERY message you receive.

I don't recommend 'autolearn'. Certainly not for a mailserver that
handles the mail of many different recipients. At least a user should be
able to switch it off for their mail.

-- 
Grtz, Ruud


____________________________________________________________
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