problem with procmail rule

problem with procmail rule

am 24.10.2007 20:33:33 von mpacker99

I have this rule and it works for most things except a couple:

:0HB:
* !^From.*xxxxxx@gmail.com
* !^From.*yyyyyy@gmail.com
* !^From.*zzzzz.com
* !^Subject.*prstu
* !^Subject.*Delivery Status Notification
* !^Subject.*failure notice
* !^Subject.*returning message to sender
* !^Subject.*Returned mail: see transcript for details
* !^Subject.*Email Feedback Report for
* !^Subject.*see transcript for details
* ? /usr/bin/bogofilter -u
/home/pac/imail/spam

basically if it's from a couple addresses or has certain words in the
subject line i do NOT want it to go through bogofilter.

this is the last rule in my recipe...

it still is running certain messages through bogofilter

I had two messages that had this subject (that got through)
Subject: Returned mail: see transcript for details
shouldn't that have been caught by the 9th line?

i also have some that have (something like this..i don't have one
saved right now)

Subject: Delivery Status Notification (user failure)

shouldn't that one be caught by the 5th line?

Thanks in Advance!

Re: problem with procmail rule

am 25.10.2007 05:09:01 von Garen Erdoisa

mpacker99@gmail.com wrote:
> I have this rule and it works for most things except a couple:
>
> :0HB:
> * !^From.*xxxxxx@gmail.com
> * !^From.*yyyyyy@gmail.com
> * !^From.*zzzzz.com
> * !^Subject.*prstu
> * !^Subject.*Delivery Status Notification
> * !^Subject.*failure notice
> * !^Subject.*returning message to sender
> * !^Subject.*Returned mail: see transcript for details
> * !^Subject.*Email Feedback Report for
> * !^Subject.*see transcript for details
> * ? /usr/bin/bogofilter -u
> /home/pac/imail/spam

What the above recipe does is look for all those regular expression
patterns in both the header and body of the message and if each of the
above patterns are not found anywhere in the message, and at the same
time the message when fed to bogofilter exits bogofilter with a return
code of zero, then the message will be filed in the specified spam
folder. Bogofilter with the -u switch will also use the message in
question to train the bogofilter database, which is a side issue here.
If bogofilter determines the message is not spam, even if the other
conditions are met, then it will exit with a return code of 1 which will
cause the above recipe to be skipped.

The logic being followed is this:

if (Regular expressions 1 through 11 are not found anywhere in the
message headers or message body) AND (Program bogofilter exits with
status 0) then

do the action (ie: file the message)

else

do nothing

endif

If you turn on verbose logging in procmail, then examine the output in
your procmail logfile, you can often tell why a particular recipe is not
working as expected.

VERBOSE=yes

>
> basically if it's from a couple addresses or has certain words in the
> subject line i do NOT want it to go through bogofilter.
>
> this is the last rule in my recipe...
>
> it still is running certain messages through bogofilter
>
> I had two messages that had this subject (that got through)
> Subject: Returned mail: see transcript for details
> shouldn't that have been caught by the 9th line?
>
> i also have some that have (something like this..i don't have one
> saved right now)
>
> Subject: Delivery Status Notification (user failure)
>
> shouldn't that one be caught by the 5th line?
>
> Thanks in Advance!
>

--
Garen