procmail
[Top] [All Lists]

Spam escaping the filter

2007-09-07 08:23:44
Hi all,

I'm a bit of a novice on Procmail but with a little help of my brother
Googleplex I managed to assemble a simple mail filter.

The purpose of it is to test a mail filter to implement on a
application, so I forward all the mail to a test account. I want to
set 2 spam filters. One more soft which gives me the Supposed Spam,
and the other one that catches 99,9% Spam. :)

I marked the first filter to tag all mail that has more thant 3 * on
Spam Level by SpamAssassin, with the tag [SPAM 1]. I also tagged all
email from this account with [HELPDESK].

--> The problem it's that some Spam with more than 3 * on Spam Level
is not being tagged and therefore remaining in the INBOX! Why? <--

On the other hand some other mail are correctly being tagged. :S

Any help on which is wrong or how can I track that?

Thankfully.

Pedro Machado Santa

Here it is my procmail recipe :

### /etc/aliases
applicationmail: | "/usr/bin/procmail -m /etc/procmailrcs/spamtest"


### /etc/procmailrcs/spamtest
PATH=/usr/local/bin:/bin:/usr/bin
LOGFILE=/var/log/procmail_spamtest.log
INCLUDERC=/etc/procmailrcs/_spamfilter-test

:0 fh w
* ^X-Spam-Level: \*\*\*
* ^Subject:\/.*
| formail -I "Subject: [SPAM 1] $MATCH"

:0 fh w
* ^Subject:\/.*
| formail -I "Subject: [HELPDESK] $MATCH"

:0
! testaccount(_at_)domain(_dot_)com


### /etc/procmailrcs/_spamfilter-test
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 256000
| /usr/bin/spamassassin

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
#:0 fh w
#* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
#* ^Subject:\/.*
#| formail -I "Subject: [SPAM 2] $MATCH"

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped.  This will re-add it.
:0
* ^^rom[ ]
{
   LOG="*** Dropped F off From_ header! Fixing up. "

   :0 fhw
   | sed -e '1s/^/F/'
}

:0 c
____________________________________________________________
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>