Tag subject of spam messages
Article updated on 23 May, 2008
Description
How to configure SpamAssassin and AXIGEN to prepend a "tag" to the subject header of spam messages.
Resolution
SpamAssassin configuration
In order to prepend a tag to the subject of spam messages with a tag of your choice, you first need to configure SpamAssassin and set the desired tag. Depending on the SpamAssassin solution used you need to edit one of the following files:
- For SpamAssassin Bundled:
/etc/opt/axigen/spamassassin/conf/local.cf
- For system SpamAssassin:
/etc/spamassassin/local.cf
or
/etc/mail/spamassassin/local.cf
In one of the files above you will need to add or uncomment the following configuration option:
rewrite_header Subject [SPAM]
AXIGEN configuration
In the AXIGEN configuration file
/var/opt/axigen/run/axigen.cfg you need to add one of the following blocks depending on the SpamAssassin solution used.
NOTE: Before editing, you should make a backup of your current AXIGEN configuration file.
- For SpamAssassin Bundled, place the following block under "socketFilters = (" line:
{
name = "AV:SpamAssassinBundled-bin"
address = "inet://127.0.0.1:1987"
protocolFile = "/var/opt/axigen/filters/spamassassin-bin.afsl"
idleTimeout = 60
actionOnMatch = pass
maxConnections = 10
}
- For system SpamAssassin, place the following block under "socketFilters = (" line:
{
name = "AV:SpamAssassin-bin"
address = "inet://127.0.0.1:783"
protocolFile = "/var/opt/axigen/filters/spamassassin-bin.afsl"
idleTimeout = 60
actionOnMatch = pass
maxConnections = 10
}
After adding one of the blocks above, save the configuration file, and reload/restart the AXIGEN service for the changes to take effect. Login to Webadmin interface, go to
Security & Filtering menu,
AntiVirus and AntiSpam context, and instead of your current active filter you need to enable the one ending in "
-bin":
- If you use SpamAssassin you need to enable SpamAssassin-bin
- If you use SpamAssassinBundled you need to enable SpamAssassinBundled-bin
NOTE: While using the "
-bin" filter and AFSL, the AntiSpam Thresholds will no longer be effective.
Applies to
Releases: Mail Server 5.0.X, Mail Server 6.0.X, Mail Server 6.1.X
OS: Linux, FreeBSD, OpenBSD, NetBSD, Solaris
Distros: RPM based distros, RPM based distros with gcc3, RPM based distros with gcc4, Slackware, Debian, Ubuntu, Gentoo, FreeBSD 5.4, NetBSD 3.0, OpenBSD 3.8, OpenBSD 3.9, Solaris 10 x86, FreeBSD 6.1, Mandriva Linux, DEB based distros with gcc4, Yellow Dog, Solaris 10 SPARC, Debian 3.1, FreeBSD 6.x, OpenBSD 4.1, Fedora PPC, OpenBSD 4.2
Comments