Spam Tests

Official Spamassasin test mail

Download & send a test spam-mail specifically created for spamsapmassin.

wget http://spamassassin.apache.org/gtube/gtube.txt
sendmail admin@example.com < gtube.txt

Swaks Utility

You can also send mails using swaks tool.

swaks --server example.com --to admin@example.com

Log Monitor

When your server receives a spam mail, you can see in postfix’s mail.loga lines like:

Oct 12 10:23:57 test3 amavis[1527219]: (1527219-07) Passed SPAM, [122.169.28.186] [122.169.28.186] &lt;rahul286@localhost> -&gt; &lt;admin@example.com>, mail_id: YOcg6RH8YipM, Hits: 11.696, size: 416, queued_as: 58C9143EE9, 5424 ms

If you have sieve filter enabled, spam mails will directly go into “Junk” folder.

spam-filtering adds extra headers to emails like below:

X-Spam-Flag: YES
X-Spam-Score: 11.696
X-Spam-Level: ***********
X-Spam-Status: Yes, score=11.696 required=6.31 tests=[FH_FROMEML_NOTLD=0.18,
	FSL_HELO_NON_FQDN_1=0.001, HELO_LOCALHOST=3.603, MISSING_MID=0.14,
	RCVD_IN_BRBL_LASTEXT=1.644, RCVD_IN_PBL=3.558, RCVD_IN_RP_RNBL=1.284,
	RCVD_IN_SORBS_DUL=0.001, RDNS_NONE=1.274, TO_NO_BRKTS_NORDNS=0.001,
	T_RCVD_IN_SEMBLACK=0.01] autolearn=no

For clean mails, spam headers looks like:

X-Spam-Flag: NO
X-Spam-Score: -0.799
X-Spam-Level: 
X-Spam-Status: No, score=-0.799 required=6.31 tests=[DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001,
	RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham

Debugging amavis

If results are not as per expectation, you can start amavis in debug mode using following commands:a

service amavis stop
amavisd-new debug