|
|
Last update: |
|
|
Using the advanced settings in webseive allow you to setup more specific filtering scripts. This allows a mail account holder to implement server-side filtering such as redirecting email to another email address, setting a vacation message, discarding unwanted mails (spam), rejecting messages from specific senders and moving particular messages into specific folders. Once you have switched to advanced mode you will have the following options: Click on the links above for instructions for each function. Change PasswordYou may change your CC account password here. Please keep in
mind that the change will affect your Unix login, your U of M CC
dial-up authentication, and any other service which requires your
CC account information.
View/Edit RulesIn advanced mode you will have to provide the raw sieve scripts. You can enter new and edit current sieve scripts in the Sieve Scipt Edit text box in the middle of the page. Click on save changes when you are done and your mail start being filtered immediately.
Below is a summery of the basics of sieve scripts There are 5 action commands, namely “keep”, “fileinto”, “redirect”, “reject”, and “discard” that can be applied to every incoming email. How to use them and what the commands do will be explained through examples.
These examples are taken from the rfc3028 document found at http://www.ietf.org/rfc/rfc3028.txt?number=3028. Please visit that page for more information about the sieve filtering a language.
Example: rejecting a message by sender
if header :contains [“To”, "from"] "@example.com" { reject "Please remove my name from your mailing list"; }
If the “To” field and the “From” field of the message header contain the string “@example.com”, that email will be bounced back to the sender, along with an attaching reject message.
Example: discarding a message by message size
if size :under 1M { keep; } else { discard; }
Incoming messeges that are less than 1 Megabytes will be allowed to enter the Inbox. Any messeges exceeding that size will be discarded.
Example: redirecting/forwarding a messages redirect "example@example.edu"; keep;
Incoming messages will all be redirected (i.e. forwarded) to another email address. If an explicit “keep” command is not used in the sieve script, all messages will be forewared and none will be kept in the Inbox.
Example: discarding a message by sender
if header :contains ["from"] ["spam@spammer.edu"] { discard; }
Any incoming emails that come specifically from the indicated email address (in the sieve script) will be discarded and not enter the Inbox.
Example: filtering a message to a folders
require "fileinto"; if header :contains ["from"] "boss" { fileinto "INBOX.work"; }
The ‘ require “fileinto” ’ line has to be included in the sieve script for the command to work. If the “From” field of the message header contains the word “boss”, that email will be filed into a folder named “work”. The “work” folder has to be created prior to using/enabling the sieve script. In general, all folders are created under Inbox, hence the reason for INBOX dot work in quotes.
Additional information and example sieve scripts can be found at http://www.cyrusoft.com/sieve/.
Extended Example of a Sieve ScriptNote that this example does not make use of the implicit keep. Anything after a hash symbol (#) is considered as a comment (i.e. the line commented out will have no effect on the sieve script other than to improve readability of the script).
# # Example Sieve Filter # Declare any optional features or extension used by the script #
require ["fileinto", "reject"];
# # Keep all messages to or from people at the university #
if address :domain :is ["From", "To"] "umanitoba.ca" {keep; # keep in "Inbox" folder}
# # Try to catch unsolicited email. If a message is not to me, # or it contains a subject (e.g. mortgage, vi.agr.a, etc.) known to be spam, file it away. # Filing spam into a folder as oppose to discarding them directly ensures that #important mails # (if caught as spam) are not lost and that they can still be viewed from within the #spam folder. #
elsif anyof (not address :all :contains ["To", "Cc", "Bcc"] " me@example.com", header :matches "subject" ["*make*money*fast*", "*university*dipl*mas*"]) { # the message header does not contain my address, # it's from a list. fileinto "INBOX.junk"; # move to "junk" folder } else { # Move all other (non-company) mail to "personal" # folder. fileinto "INBOX.personal"; # move to “personal” folder }
Warnings:
Only one sieve script can be active at a given time. If you need to create several filter rules, you may use “if-elseif-else” to combine those rules into a single sieve script, as shown in the extended example given above.
Enter the matching criteria carefully and appropriately to avoid filtering the wrong emails. Also, since spam mails are kept in a specific folder (as recommended above), do remember to check the mails that are saved under there in case there are mails that you actually needed. Then, select and discard/delete the ones that you do not need. Set ACL'sAn ACL is an Access Control List. ACLs allows you to specify
other CC users to have access to one or more of your IMAP mail
folders. You can permit any level of access, ranging from full
read and write privileges to permission to view message headers
only. Once a user has been granted access to your folder, they
will be able to subscribe to the folder with any IMAP mail client,
such as Pine.
The folder will appear in their IMAP folder tree as:
user/youruserid/yourfoldername
Advanced OptionsYou may choose between basic and advanced script mode:
|
http://www.umanitoba.ca/acn/support/email-account/websieve-adv.html
|