Evolution Spam Filtering with SpamAssassin
I found this in the Evolution 1.4 Users’ Manual:
“If you don’t have SpamAssassin or other junk mail filtering on your mail server, there’s still hope, although it’s not quite as simple. First, download and install SpamAssassin from http://spamassassin.org You'll need to download the "spamassassin" and "perl-Mail-SpamAssassin" packages, and you can install them with Red Carpet by selecting Install Local Packages from the File menu. Further instructions are at the SpamAssassin web site. Once you have the software installed, do the following:
- Open a new text file with any text editor ( Programs > Accessories > Text Editor is the most convenient) and paste in the following:
spamassassin -e. This will run the SpamAssassin command and report back 0 if the message is not junk. - Save the file as "spam-filter.sh"
- Mark the file as an executable program: Open your home directory in Nautilus, right-click on spam-filter.sh there, and select Properties. Then, click the "Permissions" tab and check the box in the Execute column and the Owner row. Alternately, open a terminal ( Programs > Accessories > Terminal ) and enter the command:
chmod +x spam-filter.sh. - Back in Evolution, create a new filter: Select Tools > Filters, then click Add.
- Select "Pipe Message to Shell Command" as the first portion of the criterion.
- Enter
"/home/username/spam-filter.sh"as the shell command, then select "Does Not Return" and "0" as the remaining two items. Substitute your username for "username" so that Evolution can find the script. - For actions, choose what you’d like to do with the messages. You can delete the messages automatically, but it's more prudent to place them in a "Possible Junk Mail" folder, and check them over just to make sure a genuine message didn't get flagged by accident.
- You're done. Click "OK" to close the filter and "OK" to close the filter editor.
There — simple, isn’t it!