

- #SPAMASSASSIN SCORE RANGE HOW TO#
- #SPAMASSASSIN SCORE RANGE INSTALL#
- #SPAMASSASSIN SCORE RANGE CODE#
My custom rules may not all be of use to you. So that i know it's a local rule and what it does. Note, the last 3 paths are all private aka "user pref" paths so most likely not what you want. So you can't expect that the paths listed below is correct but in most cases one of them will be the right one :) It will vary from installation to installation. Let's get going! Known paths, maybe one of these is what you use ?Īgain, this is just some of the known places to look. It all depends on what Spamassassin is configured with. Please note that path's may be different on your system.
#SPAMASSASSIN SCORE RANGE HOW TO#
I only use rules added globally as mine is a dedicated SMTP server to i want this to apply to all services using Spamassassin.īut i will show you how to do both.
#SPAMASSASSIN SCORE RANGE INSTALL#
One way is to install the rules globally in a "global pref" path and the other way is to have the rules only apply for a specific user in a "user pref" path. You can add custom rules to SpamAssassin in two ways. By default spamassassin and amavis if setup propperly will automatically include all *.cf files under /etc/spamassassin. Overview on all custom rules and some basic information on how to install them and how to use them. All i do is to pipe the mail to the spamassassin script/service and it then scans the mail letting amavisd handle the rest. I'm personally using Amavisd so all of my "what to do with the score" is handled by Amavisd. quarantine it or bounce it based on that score. What you then do is to tell Spamassassin and/or underlaying filters/daemons like Amavisd to mark the mail as spam or etc. So basically Spamassassin ends up giving your email a score derived from a bunch of rules.

Keep this in mind, it will help you understand why my rules do as they do. It uses a robust scoring framework and plug-ins to integrate a wide range of advanced heuristic and statistical analysis tests on email headers and body text including text analysis, Bayesian filtering, DNS blocklists, and collaborative filtering databases. SpamAssassin is the #1 Open Source anti-spam platform giving system administrators a filter to classify email and block spam (unsolicited bulk email).

If you have any suggestions on how to improve it (keeping exotic libraries out is better), I'm happy to get your opinion! Here's the code, with an example of how to use it.
#SPAMASSASSIN SCORE RANGE CODE#
I needed to implement SpamAssasin directly inside my Python code (to control the entire flow) so I implemented a client using spamd (the SpamAssassin daemon) that I connect via socket.
