Skip to main content

Custom SpamAssassin Rules

Comments

12 comments

  • cPanelMichael
    Hello, You can edit the following file to make local customizations to SpamAssassin: /etc/mail/spamassassin/local.cf This guide should be helpful for implementing custom rules: How to Configure the Apache SpamAssassin Report_Safe Option - cPanel Knowledge Base - cPanel Documentation
    0
  • jols
    Does anyone know if this still works? We have a set of rules in /etc/mail/spamassassin/local.cf but lately they seem to have no effect.
    0
  • floppyfringe
    The above hasn't worked on the server I tried it on, maybe the location of local rules has changed following a SpamAssassin upgrade? Anyone got a clue? Update: WOW it worked on a different server :D
    0
  • cPanelMichael
    Update: WOW it worked on a different server :D

    Hello, Are there any differences between the two servers (e.g. cPanel version, OS)? Thank you.
    0
  • floppyfringe
    Oddly enough they are the same. For anyone else who finds this post, the following command restarts spamassassin /scripts/restartsrv_spamd
    0
  • cPanelMichael
    To clarify, did restarting SpamAssassin resolve the issue (note that you must restart SpamAssassin after making changes to it's configuration)? Thank you.
    0
  • floppyfringe
    To clarify, did restarting SpamAssassin resolve the issue (note that you must restart SpamAssassin after making changes to it's configuration)? Thank you.

    Everything is supposed to get updated across all the servers, but yes I had restarted SpamAssassin on both, but only one worked at the time. I thought it would be helpful to mention how to go about restarting SA if someone found the post.
    0
  • floppyfringe
    Does anyone know why having a local rule for "F*ckbuddy", "F#ckFriends" or "F*ckFriends" or an American style phone number the "-", "(" or ")" seem to prevent the local rules from working, we've tried "/*" or "/#" that doesn't work either. We're getting loads of crap and we'd love to able to kill off those spams. Thanks
    0
  • floppyfringe
    Just in case someone else finds this post and are wondering how to detect a specific phone number used in spams, you use \( or \) for the brackets - then it works.
    0
  • floppyfringe
    Oh! and "F\*ckbuddy", a back slash and not forward slash, also works for the recent spams we seem to be getting loads of.
    0
  • floppyfringe
    Damn, now \* or \# isn't working? Anyone know why?
    0
  • cPanelMichael
    Hello :) You may find the following document helpful:
    0

Please sign in to leave a comment.