27.3 Managing Email

The Evolution Welcome Screen showing some email from the Evolution development team at Helix Code. {#fig:evolution.welcome}

27.3.1 Using Virtual Folders

Virtual Mail Folders is a concept familar to many GNU/Linux users, but often not found in the Win32 OS. A virtual folder groups together email messages into separate folders, using canned queires. The folders don’t actually exist as physical folders on the file system at all—the original inbox is maintained. Through this mechanism the mail in the inbox can be separated according to the mailing list that it originates from, or a group of colleagues working on a project, etc. A significant advantage of virtual folders is that you can easily change the organisation of your inbox without actually physically reorganising your inbox or extracting messages from your inbox into other physical folders. You can delete a virtual folder without actually deleting the messages in it!

27.3.2 Filtering Spam

Spamassassin, Spamassassin, Spamassassin, Spamassassin, Spamassassin, Spamassassin, Spamassassin, Spamassassin is an effective tool for filtering out spam email. If your arriving email has already been passed through spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, 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\(\rightarrow\)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, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin gets it wrong). Click OK and that’s it.

To call spamassassin for use within evolution create a script file (perhaps in /usr/local/bin/spam-filter) with:

  spamassassin -e

The -e option indicates that we should run spamassassin and return an exit code that indicates whether the email looks like spam. Make the script executable 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\(\rightarrow\)Filter and click on Add. Call the new filter something like SpamAssassin'. SelectPipe 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' and0’ 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, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin, spamassassin gets it wrong). Click OK to close the filter and then OK to close the filter editor. You are now done!

27.3.3 Filtering Viruses

Email virus filtering software is covered in Section ??, using clamav, clamav, clamav, clamav. The clamscan command can be used in evolution to find messages containing a virus. To use it in, create a shell script, perhaps in /usr/local/bin/clam-filter, making it executable, and containing just:

  clamscan --quiet --stdout --recursive --mbox -

Then in evolution create a new filter with Tools\(\rightarrow\)Filter and click on Add. Call the new filter something like ClamScan'. SelectPipe Message to Shell Command’ as the first part of the criteria. Then fill in /usr/local/bin/clam-filter as the command to run. Set Returns' and1’ for the other fields. For the action choose a folder into which the identified virus email should be placed (rather than deleting it, just in case clamscan gets it wrong). Click OK to close the filter and then OK to close the filter editor. You are now done!



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0