How do I change the SpamAssassin template for messages recognized as spam?


Browse by products and services

  • Applies to: All DV
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: SSH, root or sudo access

Overview

You can add your own template to /etc/mail/spamassassin/local.cf. There is an example one at /usr/share/spamassassin/10_default_prefs.cf.

Requirements

Before you start, this article has the following dependencies:

READ ME FIRST

The publishing of this information does not imply support of this article. This article is provided solely as a courtesy to our customers. Please take a moment to review the Statement of Support.

Sample template

Below is a snippet of that file:

Filename: /etc/mail/spamassassin/local.cf

    
clear_report_template
report Spam detection software, running on the system "_HOSTNAME_", has
report identified this incoming email as possible spam.  The original message
report has been attached to this so you can view it (if it isn't spam) or label
report similar future email.  If you have any questions, see
report _CONTACTADDRESS_ for details.
report
report Content preview:  _PREVIEW_
report
report Content analysis details:   (_SCORE_ points, _REQD_ required)
report
report " pts rule name              description"
report  ---- ---------------------- -----------------------------------------
report _SUMMARY_

Restart SpamAssassin after making any changes with the command:

/etc/init.d/psa-spamassassin restart