Difference between revisions of "SpamAssassin"

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search
Line 1: Line 1:
We're using the default spamassassin setup. No fancy custom filters, no frontends, just a reference in /etc/postfix/master.cf and that's it. If spam becomes an issue, we can have users give us some spam messages to train with, which is just a command or two away, found in the spamassassin documentation. <br>
+
== Setup ==
Spamassassin is currently quietly discarding messages marked as SPAM. We shouldn't have any issues with this, because our filters are set somewhat conservatively.
+
 
<br>'''Important Note'''<br>
+
We are using a fairly standard SpamAssassin setup, close to the default. Any variations from default '''MUST''' be noted here.
 +
Spam is getting out of hand, so the most basic setup is no longer sufficient.
 +
 
 +
=== Basic ===
 +
 
 +
A reference in /etc/postfix/master.cf lets the mail system know to use spamassassin, i.e. "spamd"
 +
 
 +
=== Sieve ===
 +
For spam filtering to work, each user needs a sieve script that directs the spam somewhere else. The most basic .sieve script is:
 +
<pre>
 +
#  a simple SPAM filter
 +
#
 +
require "fileinto";
 +
 
 +
if header :contains "X-Spam-Flag" "YES" {
 +
#
 +
#  move messages with "X-Spam-Flag: YES" header
 +
#  into "spam" folder
 +
#
 +
fileinto "INBOX.SPAM";
 +
}
 +
</pre>
 +
 
 +
=== Plugins ===
 +
 
 +
 
 +
 
 +
== '''Important Note''' ==
 
SpamAssassin needs to have a user account named spamd, and this has to be a local account as well as being in the LDAP database.
 
SpamAssassin needs to have a user account named spamd, and this has to be a local account as well as being in the LDAP database.

Revision as of 16:53, 23 September 2014

Setup

We are using a fairly standard SpamAssassin setup, close to the default. Any variations from default MUST be noted here. Spam is getting out of hand, so the most basic setup is no longer sufficient.

Basic

A reference in /etc/postfix/master.cf lets the mail system know to use spamassassin, i.e. "spamd"

Sieve

For spam filtering to work, each user needs a sieve script that directs the spam somewhere else. The most basic .sieve script is:

#  a simple SPAM filter
#
require "fileinto";

if header :contains "X-Spam-Flag" "YES" {
#
#  move messages with "X-Spam-Flag: YES" header
#  into "spam" folder
#
	fileinto "INBOX.SPAM";
}

Plugins

Important Note

SpamAssassin needs to have a user account named spamd, and this has to be a local account as well as being in the LDAP database.