Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: guest14620 on July 24, 2008, 03:56:23 AM

Title: Adding Custom Spam Rules - Filtering Attachments
Post by: guest14620 on July 24, 2008, 03:56:23 AM
I'm attempting to create a custom spam rule to Spamassassin that will filter out a certain attachment (postcards.zip) and adding it to our SME mail server (7.3).  I can't seem to find anything in the wiki about inserting my own rules, only modifying the existing rules scores.  How do I add the rule?
Title: Re: Adding Custom Spam Rules - Filtering Attachments
Post by: mmccarn on July 24, 2008, 04:43:09 AM
According to the headers of all of the files in /usr/share/spamassassin:
Code: [Select]
# Please don't modify this file as your changes will be overwritten with
# the next update. Use /etc/mail/spamassassin/local.cf instead.
# See 'perldoc Mail::SpamAssassin::Conf' for details.

I read this to mean that you should add your custom rules to /etc/mail/spamassassin/local.cf, which you can do using the same template fragment discussed in the wiki at http://wiki.contribs.org/Email#Custom_Rule_Scores.

(If you try this and it works, please clarify the wiki :))