Spam automatically deleted

Mail in CS IMAP folders (or sub-folders) named "trash", "junk", "deleted messages" or "spam" (case insensitive) older than 30 days will be automatically deleted. This will include any mail in folders within these named folders. 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 the IT Services page on junkmail

CS email is analyzed and headers are added indicating the confidence that a message is indeed spam. The X-Spam-Level: tag will be followed by zero or more stars, with more stars meaning it is more likely to be 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 example uses the Sieve mail processing language to sort incoming email. Your Sieve configuration is in /stage/sieve/username, which you can modify to suit your needs. 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 conservative. You must first create a spam folder with an IMAP mail program so the filters can file messages into it. Otherwise the messages will just end up in your inbox. Run imap_create_mailbox spam from any CS linux computer to create the folder.

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; # or redirect "my-other-email-address@domain.com";
  stop;
}

If you forward your mail via redirect, you'll want to use the same redirect statement in the whitelist section instead of "keep."

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";