This is an old revision of the document!
Plugin allows to use SpamAssassin with i-MSCP.
This plugin will not check for an existing milter configuration in the Postfix main.cf file. If you need to add an extra milter, please ask in our forum!
1. Install the needed Debian / Ubuntu packages
Installation of spamassasin packages:
# aptitude update # aptitude install spamassassin spamass-milter libmail-dkim-perl libnet-ident-perl libencode-detect-perl
Make sure spamassasin is started again after a restart
# update-rc.d spamassassin defaults
Optional install pyzor and razor
# aptitude install pyzor razor
2. Get the plugin from Plugin Store
http://i-mscp.net/filebase/index.php/Filebase/
3. Plugin upload and installation
1. Get the plugin from Plugin Store
http://i-mscp.net/filebase/index.php/Filebase/
2. Backup your current plugin config
# plugins/SpamAssassin/config.php
3. Plugin upload and update
For the different configuration options please check the plugin config file.
# plugins/SpamAssassin/config.php
After you made your config changes, don't forget to update the plugin list.
The DecodeShortURLs plugin looks for URLs shortened by a list of URL shortening services and upon finding a matching URL will connect using to the shortening service and do an HTTP HEAD lookup and retrieve the location header which points to the actual shortened URL, it then adds this URL to the list of URIs extracted by SpamAssassin which can then be accessed by other plugins, such as URIDNSBL.
iXhash2 is an unofficial improved version of iXhash plugin for SpamAssassin, adding async DNS lookups for performance and removing unneeded features. It's fully compatible with the iXhash 1.5.5 implementation.
If enabled in the config.php file, the Roundcube plugin markasjunk2 adds a new button to the mailbox toolbar to mark the selected messages as 'Junk'/'Not Junk' and will also learn the bayesian database. It will also detach original messages from spam reports if the message is not junk.
If enabled in the config.php file, the Roundcube plugin sauserprefs adds a 'Spam' tab to the 'Settings' to allow the users to change their SpamAssassin preferences which are stored in the imscp_spamassassin database. The SpamAssassin preferences shown in Roundcube will vary depending the changes you make in the config.php file.
Roundcube user config: Settings → Spam
If you want to move Spam massages into the users Junk folder, you will need the Roundcube Plugin managesieve, which is included in the I-MSCP Plugin RoundcubePlugins.
The default SpamAssassin user preferences are stored in the table userpref of the imscp_spamassassin database.
These are the $GLOBAL default values which will be imported during plugin installation.
username | preference | value |
---|---|---|
$GLOBAL | required_score | 5 |
$GLOBAL | rewrite_header Subject | *****SPAM***** |
$GLOBAL | report_safe | 1 |
$GLOBAL | use_bayes | 1 |
$GLOBAL | use_bayes_rules | 1 |
$GLOBAL | bayes_auto_learn | 1 |
$GLOBAL | bayes_auto_learn_threshold_nonspam | 0.1 |
$GLOBAL | bayes_auto_learn_threshold_spam | 12.0 |
$GLOBAL | use_auto_whitelist | 0 |
$GLOBAL | skip_rbl_checks | 1 |
$GLOBAL | use_razor2 | 0 |
$GLOBAL | use_pyzor | 0 |
$GLOBAL | use_dcc | 0 |
$GLOBAL | score USER_IN_BLACKLIST | 10 |
$GLOBAL | score USER_IN_WHITELIST | -6 |
The $GLOBAL values will be used as long as the user has no specific entries in the table. If you want to change some $GLOBAL options, please do that directly in the database.
You could also specify domain specific entries, which will be used as default only for that domain, until the user has no individual entry in the userpref table. Here are some examples for the domain example.com:
username | preference | value |
---|---|---|
%example.com | required_score | 8 |
%example.com | rewrite_header Subject | [ SPAM ] |
%example.com | report_safe | 0 |
If you enabled the Roundcube Plugin sauserprefs in the config.php file, then the user can change his SpamAssassin preferences under Roundcube → Settings → Spam.
The user preferences will also be stored in the userpref table with the mail address as username.
username | preference | value |
---|---|---|
[email protected] | required_score | 6 |
[email protected] | rewrite_header Subject | [SPAM-_HITS_] |
GTUBE (Generic Test for Unsolicited Bulk Email)
Send yourself a mail from another account (e.g. gmail or any other freemailer) with the following content in the message:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
Note that this should be reproduced in one line, without whitespace or line breaks.