Spamassasin + Procmail & Global Rules

9 posts / 0 new
Last post
#1 Sun, 02/03/2008 - 23:44
swat2

Spamassasin + Procmail & Global Rules

Hi there,

Is there any way to globally set that if spam is rated a high number (ie above 8) it automatically gets deleted. But Below that, it follows the users/domains spam rules?

Currently getting hammered with spam but most of it is in the high 10/20's but its still getting routed through when really, theres no need as its blatantly spam.

Could this perhaps be configured as an additional feature for the SPAM modules?

Thanks again for a great product, im really warming up to it now.. just a few little nigly things that im sure are my fault We'll get there in the end im sure :)

Regards, Tim Brookman

Fri, 02/08/2008 - 03:42
swat2

Joe,

I seem to be getting Ignored by you guys. I've made numerous posts and sent emails yet you guys dont respond, whats the beef? am I on some kind of ignore list? Very bad business, considering I'm a paying customer and all.

Sat, 02/09/2008 - 22:14 (Reply to #2)
webinger

Go to webmin &gt; servers &gt; Spamassassin Mail Filter &gt; Procmail Spam delivery. There you can select <b>Action for messages classified as spam</b>. There is a trow away option. Try this.

Thu, 02/21/2008 - 07:43
ken.wiesner

I was wondering about this as well. The Procmail Spam Delivery option seems to apply to all spam messages as opposed to just messages higher than a certain point value. In amavisd there was a way to say anything 5 or higher, tag as spam. Anything over 10 just delete. This way messages that were tagged but didn't have too high of a score could be routed to the Spam folder in the users maildir. Messages that had a very high value which were obviously spam could be deleted. If I understand Tim correctly, this is what both of us are trying to accomplish.

Thu, 02/21/2008 - 08:19
ken.wiesner

I think I figured out a solution. Basically I want to delete anything that has a score of 10 or higher. I tried selecting the option in the Spam Filter Module to &quot;Throw Away&quot; to see what would happen. I went into the Procmail Mail Filter module and it created a filter in Procmail...

Action to take: Append to file /dev/null
Conditions: Match regexp ^X-Spam-Status: Yes

I then changed the condition to:

^X-Spam-Status: Yes, score=[1-9][0-9].

I'm not a regex expert so if others have comments on this, by all means speak up, but from what I understand it matches text not numerical values. So the regex above should match characters like 10, 11, 12, etc. The period on the end is needed so that it will match values that have a decimal in the score. I tested this with an online regex tool and by manually copying and pasting mail headers into the tool and it seems to work!

Thu, 02/21/2008 - 12:36
ken.wiesner

Blah! Okay well after a closer look at the way things are happening in procmail I have realized that my earlier suggested solution doesn't work. The reason being, that the spamassassin scoring and routing is happening in the &quot;Execute conditional block&quot; created by virtualmin. Therefore the condition for the &quot;spam score higher than 10?&quot; will never be true. Sooo... what I THINK would need to happen for this to work correctly is to somehow edit the logic in the templates that are created in /etc/webmin/virtual-server/procmail/ to include the logic for deleting spam messages which have a score higher than X. At this point I think this falls under the realm of a &quot;feature request&quot; so I will open a ticket. I would imagine that the procmail actions could be hacked up enough to make this work without a code change but it probably wouldn't be pretty and I think this feature has enough value to warrant review by the authors.

Thu, 02/21/2008 - 12:50 (Reply to #6)
ken.wiesner

Ticket #3622 has been created for this feature request.

Thu, 02/21/2008 - 15:26
swat2

Cool! so im not a complete noob asking for outragous things :P

Thu, 02/21/2008 - 15:38 (Reply to #8)
ken.wiesner

Jamie thought it was a good idea too and is going to look into it.

Topic locked