Skip to content

moisseev/rspamd-spamness

Repository files navigation

Rspamd-spamness

This is a Thunderbird add-on for visualizing Rspamd spam scores generated on the server-side and embedded in message headers.

screenshot

Supported mail headers

The add-on uses:

  • extended Rspamd headers added by Rspamd proxy worker (X-Spamd-Result);
  • headers added by Haraka (X-Rspamd-Score and X-Rspamd-Report) from version 0.9.1;
  • headers added by Exim (X-Spam-Score and X-Spam-Report) from version 0.8.0.

To enable extended spam headers in Milter headers module add the following line to local.d/milter_headers.conf:

extended_spam_headers = true;

To enable headers in Exim refer to the "Integration with Exim MTA" section of MTA integration document.

To enable extended spam headers in Rmilter (deprecated) add the following line to rmilter.conf:

spamd {
...
        extended_spam_headers = yes;
};

Third-party spam filters

The add-on (from version 0.9.0) also supports SpamAssassin-based spam filters (e.g. SpamAssassin, MailScanner). The support is limited to displaying the total message score in the column.

Headers processing order

The add-on looks for a spam score header in the message until it finds a matched header name in this order: user-defined Additional mail headers (if specified in the Advanced options), then hardcoded default headers (X-Spamd-result, X-Spam-Score, X-Rspamd-Score, X-Spam-Status, X-MailScanner-SpamCheck). If a matched header is found the add-on does not try other headers even it cannot find score in the header.

Installation

Where to get the add-on:

To use Rspamd-spamness, you'll need to both re-build folder indices for folders that contain Rspamd-scored mail and enable the Spam score column display for each folder. If you've installed Rspamd-spamness ahead of setting up any of your accounts, you can completely ignore the rest of this section - you're all set.

Re-indexing folders

To re-index a folder, select it and choose Properties... from the context or Edit menu, then click the Repair Folder button. You will need to do this for every folder.

Displaying the 'Spam score' column

To display the column in each folder, click the column picker and select the Spam score column, making sure it's checked and the new column is visible. To apply it to all folders, click the column picker again, scrolling to the bottom to Apply columns to..., then Folder and its children... and choose the top folder for your account. The column has already been automatically added to the default columns set, but this doesn't affect existing folders.

Training Rspamd

One of the training methods is collecting emails in special IMAP folders and processing them by a script that calls rspamc.

You can enable toolbar buttons to move/copy messages to the training spam/ham folders on add-on settings page. move_buttons

You also need to specify training folder locations.

Creating XPI installer

The XPI installation package is just a ZIP file with a different extension.

Zip the contents of the add-on's directory (not the add-on directory itself) excluding hidden files and folders (whose names begin with a period), and rename the ZIP file to have an .xpi extension (or just drag and drop the ZIP to Add-ons Manager tab.).

So the ZIP file should have the following structure:

rspamd-spamness-master.zip
├── chrome/
├── defaults/
├── chrome.manifest
├── install.rdf
└── ... (other files and directories)

and not this structure:

rspamd-spamness-master.zip
└── rspamd-spamness-master/
    ├── chrome/
    ├── defaults/
    ├── chrome.manifest
    ├── install.rdf
    └── ... (other files and directories)