Creating Spam Filters

These instructions show how to add server-side rules to Office 365 email so that messages suspected as SPAM are automatically moved to your Junk E-mail folder. This should reduce the amount of SPAM delivered to your inbox. Enabling Clutter or automatically filtering junk email may also help reduce SPAM.

As a reminder, you should regularly check your Junk mailbox for messages that may have been incorrectly tagged as Spam. While we do our best to ensure that legitimate messages arrive in your Inbox, increases in malware have resulted in the likelihood of more valid messages ending up in Junk.

  1. While logged into Office 365 OWA (Outlook on the web at, click on the Settings wheel at the top right of the page and then click on Mail (under the My app settings). 

  2. On the left side menu, select Inbox and sweep rules. On the Inbox rules screen, click on the PLUS to add a new rule. 

  3. Enter a name for the rule (e.g. Caltech SPAM) and then select the condition to “It includes these words in the message header…” 

  4. Specify the following phrase by entering the following “X-Spam-Status: YES”. Click the PLUS to add.

  5. The phrase should now be saved. Click OK. 

  6. Choose the action to “Move, copy, or delete > Move the message to folder…” 

  7. Select the folder “Junk E-mail”. Click OK. 

  8. Click OK to save the new inbox rule. 

  9. Repeat Steps 2-8 to add another rule named “3-Star SPAM” with the header phrase that contains “X-Spam-Level: ***”. Note: IMSS recommends adding both the X-Spam-Status and X-Spam-Level rules.
  10. It should also be noted that X-Spam-Level can be adjusted to fewer than three stars (one or two). However, by doing so, additional messages including legitimate email are more likely to be moved into your Junk mailbox.