[How To] Customize SpamAssassin configuration
I've never been happy with cPanel's configuration options for SpamAssassin. I'm a bit odd in how I like my spam handled, so I like to change a lot of the default settings. cPanel lets me do some of that, but not all of it. Luckily, you can manually edit the configuration file.
In your home directory, there should be a .spamassassin directory. You may need to change the settings in your FTP client to see filenames that begin with a period.
Inside that directory, edit or create the user_prefs file. It's just a plain text file with SA's settings. You can find all the gory details of configuring SA 3.0.x at http://spamassassin.apache.org/full/3.0.x/dist/doc/Mail_SpamAssassin_Conf.html. Simply include the preference you want to set and the value you want to set it to, just as that page describes. There are several web scripts and downloadable programs that provide friendly interfaces for configuring SA's options. You can use those and rename the output file, or paste the contents into user_prefs.
I personally don't like my messages to be altered much, so I disable report_safe and enable use_terse_report.
Code:
report_safe 0
use_terse_report 1
That leaves the messages alone for the most part, while giving me the most important details in the headers. I also use blacklist_to to specify some aliases of mine that receive only spam. trusted_networks lets me specify the other mail servers that I have forwarding mail to mine. That allows SA to do DNS checks against the IPs that the forwarding servers got the mail from, rather than checking the forwarding servers themselves (where MysticServer got the mail from).
There are a huge number of options available, especially when you consider that each test's score can be customized. Some options may provide just the functionality you were looking for. Many of these will work fine with the defaults, so there's no need to mess with them. Some of them don't work exactly how the name might suggest. Make sure you carefully read the documentation for each setting you change.
After uploading the edited user_prefs, you may wish to disable and re-enable SA in cPanel. That will ensure that it's looking at the new configuration.
Written by: InvisiBill here: http://forums.site5.com/showthread.php?t=3569
There are no comments on this page. [Add comment]