Koozali.org: home of the SME Server

Adding Custom Spam Rules - Filtering Attachments

guest14620

Adding Custom Spam Rules - Filtering Attachments
« 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?

Offline mmccarn

  • *
  • 2,656
  • +10/-0
Re: Adding Custom Spam Rules - Filtering Attachments
« Reply #1 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 :))