procmail
[Top] [All Lists]

RE: How to make Spamassassin get rid of my spam mails?

2004-01-26 08:48:01

:0fw: spamassassin.lock
| /usr/bin/spamassassin

:0:
*^X-Spam-Status: Yes
* ^X-Spam-Flag: YES
* ^X-Spam-Level: \*\*\*\*\*\*
${MAILDIR}/SPAM_DUMPSTER
----------------------------------------

The above configuration always detects spam mails and ONLY marks it as
"******SPAM*****" in the subject line but never place it in the folder
SPAM_DUMPSTER! In the future I would like to replace the
"SPAM_DUMPSTER" to "/dev/null"!

What I want is that SpamAssassin place all my spam mails in a separate
folder. What is wrong with the above recipe?

Couple of comments and suggestions:
- it is spamassassin, not procmail putting "******SPAM*****" in the
subject line. Spamassassin can be configured in different ways to
put that tag line in the header, or not. It can format the spam mail
as a separate attachment also, which can be helpful for viewing its
summary of the mail without actually opening the mail.

- Open up one of your spam e-mails, including headers, in a text editor,
and have a look at the headers. Here's what my spam-headers look like:

X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 2.62 (2004-01-11) on screamer
X-Spam-Level: *****************************
X-Spam-Status: Yes, hits=29.2 required=5.0 tests=AF_MEDICAMENTOS,BAYES_99,
        BIZ_TLD,FVGT_b_VIAGRA,FVGT_combo_IMAGEONLY1,FVGT_s_OBFU_Z,
        FVGT_s_VIAGRI,FVGT_u_BIZ_SITE,HABEAS_SWE,HTML_70_80,
        HTML_FONTCOLOR_UNKNOWN,HTML_FONT_INVISIBLE,HTML_MESSAGE,J_BACKHAIR_1

- on some installations of Spamassassin, the X-Spam-status (showing which
rules
hit) might not be there at all. Keying on X-Spam-Flag and X-Spam-Level
should
be enough, but you really only need to key off one. In your case, since you
seem to be interested in _all_ spam, you really only need to check
X-Spam-Flag.
As Nancy mentioned, you can use X-Spam-Level to determine the confidence
level
that the spam really is spam, and act accordingly. Some folks do things like
delete all e-mail with 15 stars and above. The spam filter experts don't
recommend outright deletion of e-mail, because there's a chance that the
e-mail
you delete is that important contract your boss wanted you to review. <g>

- the default score cut off for Spamassassin is 5.0. Therefore, the most
minimal
spam with have _five_ (5) stars, and not six as you have above.

- since you're explicitly substituting ${MAILDIR} above, it is important to
know
whet ${MAILDIR} is set to. As Nancy recommended you probably don't need to
reference ${MAILDIR} explicitly.

Recommended rewrite:

:0:
* ^X-Spam-Flag: Yes
SPAM_DUMPSTER



_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail