Email - sieve
sieve is a programming language that is used to create mail filters. Our Local Delivery Agent (LDA) uses a sieve plugin to allow mail filtering. The sieve code goes in a file .dovecot.sieve which is located in your home directory on the login server,which is tau.phas.ubc.ca in 2016-03-01 (/mail/$HOME/). A user with username "fred" and login directory /home/fred would login to tau & $edit /mail/home/fred/.dovecot.sieve
PHAS Default .dovecot.sieve File
All phas mail accounts will be get the following sieve file upon creation. You can open this file with any text editor. This filters all messages with a Header line of X-Spam-Level and with 3 or more X's. This line and others are added by the Sophos anti-spam software run on the UBC mail-relays. The message is filed in a mailbox called SPAM_PMX; it will not appear in your inbox. You can/should check this folder periodically for false positives. If the matching condition is NOT met the filter executes an implicit keep command & files the message into inbox.
PHAS Default .dovecot.sieve File
Other sieve Examples
We present here some common examples of mail filtering with sieve. For further details and more examples sieve.info.
Header Line: most sieve filters will include a require line enumerating the optional commands the script may use.
WhiteLists
If you find that messages from a correspondent are matching the Spam filtering & not being delivered to your inbox, you can white list that correspondent. This snippet should be placed above the Spam filter.
Whitelist an entire mail domain by matching the domain part of the From Address
BlackLists
You continuely get messages that you do not want to read & they do not caught by the Spam filtering; you can Black list
Vacation Message
You're on vacation ( at last !!) & you want your mail correspondents know that you may not being answering email.
Forwarding
To forward all unfiltered messages to another account add the following line at the end of your .dovecot.sieve file:
External Sieve Resources
Please consult the following references or contact one of the ITstaff for more information on using sieve.
Sieve Help