Email sieve

From Cncz
Revision as of 12:39, 26 January 2010 by Petervc (talk | contribs) (Sieve)
Jump to: navigation, search

Sieve

If one wants incoming mail to be sorted into folders automatically or to be filtered in some special way, one can use "Sieve" if one has the IMAP-server post.science.ru.nl as incoming mailserver. The Sieve language is described in RFC3028. To put the sieve script on the mail server and activate it, use a mail program which supports sieve, e.g. KMail or Thunderbird with the sieve addon.

Examples of Sieve-scripts

  • If some mail should be sorted automatically into an existing folder, one can use a script like:

require [ "fileinto", "include" ];
#
# Messages into folders.
#
if header :contains "X-VirusscanResult" "infected" {
        fileinto "INBOX.Virus";
        stop;
}
if address :is ["From", "To"] [
              "",
              ""
        ]
{
        fileinto "INBOX.Symposium2008";
        stop; 
}
include "spam";
include "vacation";

If one wants to redirect all mail that remains after our spamfilter has done its job, one has to add after the include "spam"; line:

redirect "";