Difference between revisions of "SpamAssassin"

From HE FAQ
Jump to: navigation, search
Line 14: Line 14:
 
* Open your text editor.
 
* Open your text editor.
 
* Apply the right ruleset:
 
* Apply the right ruleset:
:If you're on one of our newer servers, copy the following and paste it into your editor window:
+
:If you're on one of our newer v3 servers, copy the following and paste it into your editor window:
 
<pre>
 
<pre>
 
:0fw
 
:0fw
Line 29: Line 29:
 
$DEFAULT/.Spam/
 
$DEFAULT/.Spam/
 
</pre>
 
</pre>
:If you're on one of our older servers, copy the following and paste it into your editor window:
+
:If you're on one of our older v1 or v2 servers, copy the following and paste it into your editor window:
 
<pre>
 
<pre>
 
:0fw
 
:0fw
Line 49: Line 49:
 
* Upload the procmail.txt file, and make sure that you use ASCII format when you do so.
 
* Upload the procmail.txt file, and make sure that you use ASCII format when you do so.
 
* Once the file is uploaded, rename the file: .procmailrc (note the preceding period; this is very important)
 
* Once the file is uploaded, rename the file: .procmailrc (note the preceding period; this is very important)
 +
 +
==== Deleting super-spam (optional) (v3 only) ====
 +
 +
Some spam is spammier than other spam. Spamassassin knows this and scores appropriately. Anything under a default score of 5 is sent to your Inbox. Anything 5 or above is sent to the Spam folder. This is good for catching false positives, but digging through piles of 15s or 20s can be tiresome.
 +
 +
It's possible to delete this high scoring "super-spam" while keeping the lower scoring spam. Here is a full ruleset that deletes 12s and above:
 +
 +
<pre>
 +
:0fw
 +
* < 60000
 +
| /usr/bin/spamc
 +
 +
:0e
 +
{
 +
    EXITCODE=77
 +
}
 +
 +
:0
 +
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*
 +
/dev/null
 +
 +
:0:
 +
* ^X-Spam-Status: Yes
 +
$DEFAULT/.Spam/
 +
</pre>
 +
 +
Note the <tt>* ^X-Spam-Level:</tt> addition. Every <tt>\*</tt> is one point of Spam score you're automatically deleting. The more asterisks, the more spam gets stored in your Spam folder.
  
 
=== You're done! ===  
 
=== You're done! ===  

Revision as of 13:51, 17 June 2010

This information only pertains to Hurricane Electric's Shared Web Hosting package. There may be different information in our other categories.

SpamAssassin is a program installed on our virtual web servers that filters your email for spam based on a pre-defined scoring system. We provide this service free of charge to our customers. It requires a small procmail configuration inside your account space.

Instructions

What you'll need:

  • a text editor, such as Notepad (Windows) or TextEdit (Mac). Important: make sure the editor is set to Plain Text mode and not Rich Text mode.
  • an FTP or SFTP client, such as WinSCP (Windows) or Cyberduck (Mac), the same one you used when uploading your website. Note: if you had a third party upload your website, ask them to perform this entire task for you instead.

Activation Walkthrough

Here are the instructions for installing SpamAssassin in your account:

  • Open your text editor.
  • Apply the right ruleset:
If you're on one of our newer v3 servers, copy the following and paste it into your editor window:
:0fw
* < 60000
| /usr/bin/spamc

:0e
{
    EXITCODE=77
}

:0:
* ^X-Spam-Status: Yes
$DEFAULT/.Spam/
If you're on one of our older v1 or v2 servers, copy the following and paste it into your editor window:
:0fw
* < 60000
| /usr/bin/spamassassin

:0e
{
    EXITCODE=77
}

:0:
* ^X-Spam-Status: Yes
/dev/null
Note: if you're unsure whether or not you're on an older or newer server, please contact support.
  • Save the file as: procmail.txt
  • Connect to your webhosting server via SFTP.
  • Upload the procmail.txt file, and make sure that you use ASCII format when you do so.
  • Once the file is uploaded, rename the file: .procmailrc (note the preceding period; this is very important)

Deleting super-spam (optional) (v3 only)

Some spam is spammier than other spam. Spamassassin knows this and scores appropriately. Anything under a default score of 5 is sent to your Inbox. Anything 5 or above is sent to the Spam folder. This is good for catching false positives, but digging through piles of 15s or 20s can be tiresome.

It's possible to delete this high scoring "super-spam" while keeping the lower scoring spam. Here is a full ruleset that deletes 12s and above:

:0fw
* < 60000
| /usr/bin/spamc

:0e
{
    EXITCODE=77
}

:0 
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\* 
/dev/null 

:0:
* ^X-Spam-Status: Yes
$DEFAULT/.Spam/

Note the * ^X-Spam-Level: addition. Every \* is one point of Spam score you're automatically deleting. The more asterisks, the more spam gets stored in your Spam folder.

You're done!

Spamassassin is now installed and will work instantly and automatically for all email accounts.

Troubleshooting

If you've set a procmail.log file within your .procmailrc, you can examine that file for originating email addresses, subjects, file size, and times of the spam receipt:

-----
From terry7567793414v13@spamhub.com.au  Thu Jul 11 00:13:15 2002
 Subject: *****SPAM***** Here is that link 1594HNsC1--9
  Folder: /dev/null                                                        4748
-----

For detailed information about SpamAssassin, please visit spamassassin.org.