Difference between revisions of "SpamAssassin"
m (→Troubleshooting: Mentioned privilege) |
|||
Line 85: | Line 85: | ||
== Whitelisting/Blacklisting == | == Whitelisting/Blacklisting == | ||
You can also use SpamAssassin to automatically flag email from some addresses or domains as spam, or always let it through regardless of how spammy it is. To do this, connect to your account using SFTP or SSH and change to the ".spamassassin" directory. You may need to configure your SFTP client to show hidden files for it to show up. In that directory, edit the file named "user_prefs". To add addresses or domains to your whitelist or blacklist, add lines similar to the following and save the file: | You can also use SpamAssassin to automatically flag email from some addresses or domains as spam, or always let it through regardless of how spammy it is. To do this, connect to your account using SFTP or SSH and change to the ".spamassassin" directory. You may need to configure your SFTP client to show hidden files for it to show up. In that directory, edit the file named "user_prefs". To add addresses or domains to your whitelist or blacklist, add lines similar to the following and save the file: | ||
− | <pre> | + | <pre>whitelist_auth *@he.net |
blacklist_from bob@iselljunk.com</pre> | blacklist_from bob@iselljunk.com</pre> | ||
Latest revision as of 09:49, 24 August 2015
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.
Contents
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/.Junk/
- If you're on one of our older v1 or v2 servers, copy the following and paste it into your editor window. Note that this results in emails identified as spam being deleted outright. Placing spam emails in a Junk folder is a feature supported only on our version 3 servers.
: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)
If you already have a file named .procmailrc (e.g. for email forwarding), instead of creating a new file, edit the existing one and put the above examples into it, below the general settings but before any of the other recipes. You want to remove spam before forwarding!
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/.Junk/
Note the * ^X-Spam-Level: addition. Every \* is one point of Spam score you're automatically deleting. More asterisks, more saved spam. Fewer asterisks, more automatically deleted spam.
You're done!
Spamassassin is now installed and will work instantly and automatically for all email accounts.
Whitelisting/Blacklisting
You can also use SpamAssassin to automatically flag email from some addresses or domains as spam, or always let it through regardless of how spammy it is. To do this, connect to your account using SFTP or SSH and change to the ".spamassassin" directory. You may need to configure your SFTP client to show hidden files for it to show up. In that directory, edit the file named "user_prefs". To add addresses or domains to your whitelist or blacklist, add lines similar to the following and save the file:
whitelist_auth *@he.net blacklist_from bob@iselljunk.com
You can read the comments in user_prefs for other options you can change by editing it.
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.apache.org.
Please note that options listed in the SpamAssassin documentation as "privileged," such as custom rule definitions, are not available.