With the percentage of spam being sent ever increasing, many people wish to incorporate the facilities of SpamAssassin into Xamime to assist in the culling operation.

Requirements

  • Installed SpamAssassin client/server. For more details, please visit this page. I can highly recommend the Perl "CPAN" installation option.
  • Xamime with prefilter option (You can check to see if your xamime supports prefilter in the 'Edit Configuration' page..
  • spamc-filter and spam-filter

Concept Before Xamime commences any disassembly or testing of a mailpack it may first optionally run a prefilter. The prefilter allows adminstrators to invoke an external program with full access to the mailpack file, sender and receiver information. Using this facility, we can invoke SpamAssassin and use it to insert a spam-score header into the mailpack.


Once the prefilter has completed, Xamime will continue to process the mailpack as per normal. In order to filter out spammed emails, it is a simple matter of checking for a particular SpamAssassin header. Most commonly, the

X-Spam-Level:
header is used. eg:

   X-Spam-Level: ********

This header indicates that the mailpack was ranked '8' on the spam scale. In order to block this and any other emails with a greater spam level, we utilise an ACLitem as follows:

	DENY Text-test ^X-spam-level.*\*{8,} "Block all spams over level 8"
	
or illustrated in a browser:


Proceedure

  1. Install SpamAssassin and configure
    • NOTE, you may find that you want to use the following options in your spamassassin's local.cf file (usually located in /etc/mail/spamassassin/local.cf) if you are finding that SpamAssassin is modifying your emails too much (typically putting spam reports into the main body of the email).
      	always_add_report 0
      	use_terse_report 1
      	report_safe 0
      
  2. Install spamc-filter and spam-filter scripts to /usr/local/xamime
  3. Configure prefilter to execute either spamc-filter or spam-filter scripts
  4. Add ACL-item to detect the presence of X-spam-level header with a spam level greater than desired threshold
    • Create a new ACLitem within an existing ACL
    • Configure ACLitem to contain the following paramters;
      • Test Mode: DENY
      • Status: Active
      • Inverting-Mode: Non-inverting
      • Text String Test
      • Text String: ^X-Spam-Level:.*\*{8,} (note his has recently been changed so it won't be the same as the illustration)
      • Comment: Deny all spams over level-8
  5. Congratulations, your Xamime will now start to deny spam messages

For further queries, please email xamime-support@pldaniels.com



For corrections and suggestions - WWW administrator