wiki:faq/email/sa-filter-spam

Version 1 (modified by Jamie McClelland, 12 years ago) (diff)

--

How do I use Spam Assassin to filter email with my email client?

Note: this page specifically addresses using filters to deal with unwanted bulk email. Filters can be used for many purposes and for instructions on creating and using filters in general go to the Using Filters in Your Email Program? help screen. In addition, if you use our webmail program (Horde/Imp or SquirrelMail) specific directions for filtering spam with these programs are here.

To use Spam Assassin, you create a filter to catch Spam Assassin's "flags".

You can do this two ways, depending on the email client or webmail program you are using.

All email clients let you create a filter for the Subject line. So you create a filter with

*SPAM*

as the filter's trigger -- the box that will say something like "contains" or "text". Email filters catch all email in the subject line that contains the trigger phrase so, since the subject is going to change with each email, you just include the part you are sure will appear in all spam. That's what we just wrote above.

Some email programs also let you create a filter for "any header" and if yours does, you can make a filter with the flag line

X-Spam-Status: YES

as the filter's trigger and have your program send the affected email to a special box (either trash or, if you want, a box you create -- you can call it "spam" for example). This method isn't recommended but it's possible so we include it.

The basic idea is that you are telling your email program to filter all messages that have the trigger line. In this way, you're using Spam Assassin as a kind of detective.