The campus IMAP server supports a server-side email filter language called Sieve. Here are some links that describe this language and offer some tutorials:
If your mailbox does not already contain a junk e-mail folder, create the folder Junk E-mail. It needs to be spelled (with the indicated case) exactly like that. Any messages found in this folder--or any folders beneath it--will be automatically deleted off of the server after 60 days. For this reason, you need to be prepared to check the contents of this folder periodically.
Using a text editor such as Notepad or Pico on UNIX systems, create the file filter.script containing the following:
require ["envelope","fileinto"];
if header :contains "X-Spam-Level" "*******" {
fileinto "Junk E-mail";
stop;
}
What this says is that if the message contains a special header (the portion of the message that contains routing information), it saves that message into the Junk E-mail folder you just created. If that folder does not exist, then the fileinto command will fail and the message will remain in your inbox.
The next step in this process is activating the script.
- If you created the Sieve script on your local computer, you will need to upload that script into your home directory. For instructions on how to do so, see how to use sftp.
- Once you have written your Sieve script, say filter.script, you may upload this script using the sieveshell command on apache.utdallas.edu. At the UNIX shell prompt, issue the following command:
$ sieveshell inbox
- After you login, you can issue the help command to see what other commands are available. To upload your script, use the put command:
> put filter.script
- You will then need to activate your script:
> activate filter
- Notice how the .script extension was not specified. Here we are talking about the script name, not the file name.
Now when an email message reaches your IMAP inbox, this active Sieve script will be run against the message. Note: if you exceed your IMAP quota, the Sieve script will not be run. Instead, after 5 days the message will be bounced back to the sender as being undeliverable.
- For further assistance, contact the Help Desk at 972-883-2911 or assist@utdallas.edu. The Help Desk’s office is located in JO 3.906.