How do I test if my anti-spam configuration works?
by The editorial team
Solution:
There is a special feature supported by Spamassassin named the GTUBE (Global Test for Unsolicited Bulk Email).
It consists of a rule which recognizes the 68-bytes string which is sent in the email’s body. If the email goes through spamassassin, it will be detected as spam.
To test, send an email to a specific address, which has antispam rules configured. Enclose this 68-byte string:
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
This test is similar to the EICAR anti-virus test file for antivirus softwares.
contributed by Sebastien Aime







January 20th, 2007 at 6:53 am
Funktionsfähigkeit von SpamAssassin testen
January 20th, 2007 at 4:27 pm
I guess that’s a better way than floating your address on the Net to test out your anti-spam s/w.
February 1st, 2007 at 3:25 am
This is nice, but it does NOT test whether a specific set of rules or any other specific feature of spamassasin is working. How do you test that?
February 2nd, 2007 at 5:48 am
Mojo:
This test lets you determine that Spamassassin is configured and working correctly. If you want to test a specific rule, you have to craft an email that triggers that rule, send it, and see if it catches it (and likewise craft one that doesn’t trigger the rule and make sure it goes through unmolested).
February 2nd, 2007 at 5:02 pm
Combined with the above the following will test the remaining functions of spamassassin:
sudo -H -u root spamassassin -t -D –lint &1 | grep -v ‘dbg’
Change “root” to the actual user that spamassassin or spamd runs as. Sudo runs spamassassin as this user so you can confirm your configuration files and log directories are readable and writable by that user.
If you are running spamd/spamc you should test both of these as well.
Test spamd by running it on the command line with the same options that are specified in your rc file, but add the -D option for debugging, and use the `sudo -H -u root` trick above (again, replacing “root” with the actual user that spamd will run as). You may need to stop any existing spamd processes. After testing, start spamd as normal before testing spamc.
Test spamc with:
spamc -R
February 2nd, 2007 at 5:04 pm
OH RATS this comment system fudged my examples by removing everything after the [left/right angle bracket symbol]. Here are the examples again, with [left angle bracket symbol] replaced with { and [right angle bracket symbol] replaced with } instead:
sudo -H -u root spamassassin -t -D –lint { /path/to/example.email 2}&1 | grep -v ‘dbg’
spamc -R { /path/to/example.email
May 7th, 2008 at 4:53 am
ea94f46d1cb2
ea94f46d1cb2a104d28b