ECE Computer Support.
SmartSieve
What is SmartSieve?
SmartSieve is a web-based tool for editing Sieve scripts. Sieve scripts are used by the ECE mail server to filter email before it reaches your mail folders. SmartSieve can be used to automatically generate scripts which take care of certain mail filtering tasks, such as vacation messages, spam filtering, and forwarding.
Logging in to SmartSieve:- The SmartSieve web page is located at https://www.ee.duke.edu/smartsieve
- Log in using your ECE email/unix username and password.
- You will be presented with the SmartSieve main page at login.
- It is possible that ECE Computer Support has already set up a script for you. This script is not compatible with the SmartSieve automated interface. To see if you have a preexiting script, click on the "Manage Scripts" link at the top right of the screen.
- If you already have a script in place, you will see a screen similar to this one. Instead of "jdoe", the script will be named for your username. You will need to deactivate this script by clicking the checkbox next to it, then clicking the "Deactivate" link underneath the script listing. You will probably want to be sure to re-activate your spam filtering (see below) using the SmartSieve interface.
- If you do not have a script in place, you will see this screen.
You can now proceed with creating a set of filtering rules.
[ Spam Filtering | Vacation Messages | Mail Forwarding | Advanced Uses of Sieve ]
Spam filtering will allow you to take advantage of ECE's SpamAssassin software. All email passing through the ECE mail server is scanned by SpamAssassin and given a spam "score" based on SpamAssassin's knowledge of what spam messages look like. Messages with a spam score above a certain level are marked as spam in the message headers. You can configure SmartSieve to automatically send these messages to a special spam folder rather than your INBOX. Since it's possible that a few legitimate emails might be marked as spam, it's best to check your spam folder a few times a week. You can then delete all the spam messages at once.
To turn on spam filtering:
- Create a new mail folder on the mail server into which you will file messages marked as spam. This is easily done with most mail clients, or via ECE Webmail. You must complete this step before moving on.
- Log into SmartSieve at https://www.ee.duke.edu/smartsieve using the instructions above.
- Click the "Set Spam Filter" link at the top of the page.
- Choose the folder to filter spam into from the drop-down list.
- Click the "Save Changes" link to activate the spam filtering. You will be taken to the "Mail Filter Rules" page where you will see the spam filtering script listed.
- Click the "Manage Scripts" link to be sure that the script called "smartsieve" is listed as "ACTIVE". If you have multiple scripts listed here and the "smartsieve" script is not active, click the checkbox next to the "smartsieve" script, then click the "Activate" button.
- Log out, and be sure to check your spam folder at least one a week.
What is a vacation message? It's a way to send an automatic reply to people who send you email. If you're going on a holiday or travelling to a conference and will be unable to check your email frequently (or at all), a vacation message is a way to let people know that their email was delivered, but that you won't be able to respond immediately.
To create a vacation message:- Log into SmartSieve at https://www.ee.duke.edu/smartsieve using the instructions above.
- Click the "Vacation Settings" link at the top of the page.
- Fill in the text of your vacation message in the large text box. Be sure to include details
such as your departure and return dates, and whether someone else should be contacted in your
absence. For example:
I will be travelling out of the country from June 6 until June 20. Please contact Jane Smith (jane.smith@duke.edu) if you have an urgent request.
- Choose the number of days that the sieve script should wait before sending another vacation message to the same person. For example, if your friend Bob emails you and gets your vacation message, the script will wait the specified number of days before sending him another vacation message. 7 days is a good default to avoid spamming your correspondants with too many vacation messages.
- Enter your email address in the third field.
- Click "Save Changes" to save the vacation message.
- Click the "Manage Scripts" link to be sure that the script called "smartsieve" is listed as "ACTIVE". If you have multiple scripts listed here and the "smartsieve" script is not active, click the checkbox next to the "smartsieve" script, then click the "Activate" button.
To disable a vacation message:
- Log into SmartSieve at https://www.ee.duke.edu/smartsieve using the instructions above.
- Click the "Vacation Settings" link at the top of the page.
- Click the "Disable" link underneath the Vacation Settings form.
- You should be sent back to the "Mail Filter Rules" page and see that the vacation message is listed as "Disabled" in red.
What is email forwarding? Like postal mail forwarding, email forwarding allows you to automatically send mail from one place to another. For example, if you prefer to use your Duke email account as your primary account, you can forward your ECE email to your Duke address and read all of your emails in one place.
To forward your ECE email to another address or change or remove an existing forward:
- Log into SmartSieve at https://www.ee.duke.edu/smartsieve using the instructions above.
- Click on the "Set Forwarding" link at the top of the page.
- If you have any existing ECE email forwards, the form will be pre-filled with them. If not, the form will be blank.
- Type in the address(es) that you want to forward your email to. If you want to forward your email to more than one address, put a space between each address. If you no longer want to forward your email, remove the forwarding address(es) from the form.
- Make sure that you are not forwarding your email to an address that is already forwarding back to ECE. Mail loops are not fun, and your email will just bounce.
- If you want to have a copy of each forwarded email kept in your ECE inbox, check the checkbox.
- To save your settings, click the "Save Changes" link at the bottom of the form.
- It will take up to 5 minutes for the new settings to take effect.
If you feel comfortable creating your own sieve scripts, you can do so via the SmartSieve interface. Writing your own sieve scripts gives you a great deal of control over how your email is handled. Note that it is possible to lose emails when writing your own scripts; be sure that you know what you're doing! Note also that custom sieve scripts cannot be edited automatically via the gui; for example, to create a vacation message in a custom script, you must add the vacation settings to the custom script manually, not by clicking on the "Vacation Settings" link. Only the default "smartsieve" script can have spam filtering and vacation messages added automatically.
- Log into SmartSieve at https://www.ee.duke.edu/smartsieve using the instructions above.
- Click on the "Manage Scripts" link at the top of the page.
- Click the "Create" link at the bottom of the page to create a new script.
- Type in a name for your new script when prompted.
- The new script should show up in your list of Sieve scripts. Click on the name of the new script.
- You can now edit the script to your liking in the blank textarea on the "Advanced Mail Filter Rules" page.
- When you are done editing your script, click "save". If your syntax is incorrect, you will see an error; otherwise, the script will be saved.
- You can only have one active Sieve script at a time. To make this script your active script, click on "Manage Scripts". Check the box next to the script, then click the "Activate" link at the bottom of the page. The script should how have a green "ACTIVE" setting in the "Status" column.
Sieve script examples:
This Sieve script will file emails from personone@duke.edu into a mail folder called "PersonOne", file emails with the subject "Exciting Mailing List" into a mail folder called "Exciting", and banish spam emails to the "spam" mail folder. These mail folders should be created before the script is activated; otherwise, the emails will just go to the main Inbox folder.
require "fileinto";if header :contains "from" "personone@duke.edu" {
fileinto "PersonOne";
}elsif header :contains "subject" "Exciting Mailing List" {
fileinto "Exciting";
}elsif header :contains ["X-Spam-Flag", "X-PMX-Spam-Level"] ["YES", "Black"] {
fileinto "spam";
}
This Sieve script will filter spam into the "spam" folder, and send a "vacation" message to anyone who sends mail to "user@ee.duke.edu" or "user@ece.duke.edu". The script will wait 7 days before sending another "vacation" message to someone who has already received one.
require "fileinto";
require "vacation";
if header :contains ["X-Spam-Flag", "X-PMX-Spam-Level"] ["YES", "Black"] {
fileinto "spam";
}vacation :days 7 :addresses ["user@ee.duke.edu", "user@ece.duke.edu"]
"I will be away from my email until July 8th. If this is a matter
of urgent business, please contact Fred Smith (fsmith@ee.duke.edu).";


