Spam automatically deleted

Mail in CS IMAP folders named "trash", "junk", "deleted messages" or "spam" (case insensitive) older than 30 days will be automatically deleted. If you don't want these messages deleted, move them to another folder.

Filtering Spam

This page describes spam filtering for mail sent to a "username@cs.uchicago.edu" address. For information on spam and virus filtering for "username@uchicago.edu" addresses, see NSIT's Junkmail page

CS email is scanned by a system that tries to identify spam email messages, and adds tags to the message headers indicating how confident it is that a message is indeed spam. The X-Spam-Level: tag will be followed by zero or more stars, with more stars meaning it more strongly believes the message is spam.

The headers look like this for spam:

X-Spam-Status: No, hits=5.8 tagged_above=-999.0 required=999.0 tests=CLICK_BELOW,
 FORGED_MUA_OIMO, MISSING_MIMEOLE, NO_REAL_NAME, ONE_TIME
X-Spam-Level: *****

And like this for regular mail:

X-Spam-Status: No, hits=-1.1 tagged_above=-999.0 required=999.0 tests=BAYES_30
X-Spam-Level:

We recommend filtering to a separate folder based on the X-Spam-Level header, then occasionally viewing this folder to make sure all the messages are indeed spam before deleting them.

Filtering potential spam into a spam folder

The following examples put incoming email into a folder spam if the spam tagger gives it at least five stars. You may want to raise or lower the number of stars to reduce mis-filtered mail. You must first create a spam folder with an IMAP mail program so the filters can file messages into it. Otherwise the messages will not be filtered.

IMAP mail users: Filter spam using sieve

Sieve is a language for filtering e-mail messages. It is an implementation of Internet RFC 3028

If you use our IMAP mail service, i.e. if you send your mail to our imap server in your forward file, you can filter spam into a folder spam by entering the following into your /stage/sieve/$USER file. This example filters to the spam folder messages tagged with five or more stars. You can change the number of stars to be more or less restrictive:

require "fileinto";
#
# Filter messages with five or more stars:
if header :contains "X-Spam-Level" "*****" {
  fileinto "spam";
  stop;
}

Whitelisting

You can white-list email by putting in a rule above the spam filter:
# whitelist: save message in mailbox
if header :contains "From" ["onlinetaxes@hrblock.com", "pwc.com", "ameritrade"] {
  keep;
  stop;
}

We suggest you check your sieve file for syntax errors with:

sieve_checker -v /stage/sieve/$USER

Example sieve file

require "fileinto";

# Catch whitelisted emails here. Example: # if header :contains ["From"] # ["my-whitelisted-address@domain.com", "who@where.com"] # { keep; stop; } # if header :contains ["Subject"] # ["CS Announcements", "CS1502"] # { keep; stop; }

# Prevent anything over ten stars to even reach your INBOX: if header :contains "X-Spam-Level" "**********" { discard; stop; }

# Messages with four stars will be filed into a "spam" folder. # Messages in the "spam" folder older than 30 days will be deleted regularly. # Do NOT delete the "spam" folder. if header :contains "X-Spam-Level" "****" { fileinto "spam"; stop; }

# Forwarding example. Forwarding rules MUST come after spam catching rules: # redirect "my-other-email-address@domain.com";

# Two copy example. Use this to forward e-mails # AND keep a copy in your CS account: # keep; redirect "my-other-email-address@domain.com";

Brought to you by SpamAssassin