GNU/Linux Desktop Survival Guide
by Graham Williams
Spamassassin is an effective tool for filtering out spam email. If your arriving email has already been passed through spamassassin (by your ISP or else through using fetchmail yourself), then you simply have to check for the appropriate header field in the email (i.e., check if X-Span-Flags exists and contains YES). Set up an evolution filter to do this. Select Tools-->Filter and click on Add. The search criterion will be to look at a Specific header (X-Spam-Flag) and to check that it contains YES. For the action choose a folder into which the identified spam should be placed (rather than deleting it, just in case spamassassin gets it wrong). Click OK and that's it.
To call spamassassin for use within evolution
script file (perhaps in /usr/local/bin/spam-filter) with:
$ chmod u+x /usr/local/bin/spam-filter
Now tell evolution to filter you email with this script. So, create a new filter with Tools-->Filter and click on Add. Call the new filter something like `SpamAssassin'. Select `Pipe Message to Shell Command' as the first part of the criteria. Then fill in /usr/local/bin/spam-filter as the command to run. Set `Does Not Return' and `0' for the other fields. For the action choose a folder into which the identified spam should be placed (rather than deleting it, just in case spamassassin gets it wrong). Click OK to close the filter and then OK to close the filter editor. You are now done!
Copyright © 1995-2006 [email protected]