Contents  SpamSieve Manual  Technical Support

3.7   Setting Up Outlook 365

These instructions apply to Microsoft Office 365 (also known as Outlook 2016 and Outlook 2019, versions 15.x and 16.x). For other versions of Outlook, please see the Setting Up Outlook 2011 section.

  1. In the Finder, choose Utilities from the Go menu and open the Script Editor (or AppleScript Editor) application. Open its Preferences window. Click on the General tab, and make sure that Show Script menu in menu bar is checked.

  2. Switch to SpamSieve by clicking on its icon in the Dock. Go to the SpamSieve menu and choose Preferences…. Make sure that Use Entourage/Outlook address book is checked and click the Load button, then the Outlook button.

  3. Choose Install Outlook Scripts from the SpamSieve menu. When in Outlook, you should now see five SpamSieve items in Script menu at the top-right of your screen:

    outlook 15 scripts menu

  4. For each account in Outlook, create a new folder called InboxSpamSieve in the account. You can do this by Control-clicking on the name of the account in Outlook’s main window and choosing New Folder. (For POP accounts, just create one InboxSpamSieve folder under On My Computer.) InboxSpamSieve is where messages yet to be processed by SpamSieve will be stored temporarily. The Outlook - Filter Mailboxes app will periodically scan the messages in this folder, moving the good ones to Inbox and the spam ones to Junk.

  5. Go to Outlook’s Tools menu and select Rules. Click on the source list item under Client Rules corresponding to the type of account you that have (e.g. IMAP, Exchange, or POP). Ignore the Server Rules section of the window, if any. Uncheck or delete any (non-SpamSieve) rules for filtering out junk/spam e-mails.

    outlook 365 rules list

  6. Now you will create rule(s) to move all new messages to the InboxSpamSieve folder. If you have more than one kind of account, you will need to repeat Steps 5-8 for each account type.

    1. Click the + button at the bottom of the window. Change the name of the rule to InboxSpamSieve (AccountName) where AccountName is the name of your account (e.g. iCloud in this example).

    2. For each IMAP or Exchange account, under When a new message arrives, choose Folder, Is, and INBOX (AccountName):

      outlook 365 rule imap

      If INBOX (AccountName) is not in the third pop-up menu, you can select Choose Folder… from the pop-up menu and then search for it:

      outlook 365 choose inbox

      Under Do the following, choose Move Message and InboxSpamSieve (AccountName). If InboxSpamSieve (AccountName) is not in the second pop-up menu, you can select Choose Folder… from the pop-up menu and then search for it:

      outlook 365 choose inbox spamsieve

    3. If you have a Gmail account and are not able to find the rule options mentioned in Step (b), please see Outlook 365 and Gmail and Using a Generic IMAP Account for Gmail below.

    4. For each POP account, under When a new message arrives choose Account, Is, and AccountName (POPAccount in this example):

      outlook 365 rule pop

      Under Do the following, choose Move Message and InboxSpamSieve (On My Computer). If InboxSpamSieve (On My Computer) is not in the second pop-up menu, you can select Choose Folder… from the pop-up menu and then search for it.

  7. Now proceed to the Do an Initial Training section.

    • To train SpamSieve with spam messages, select one or more of them and then choose SpamSieve - Train as Spam from the Script menu.
    • To train SpamSieve with good messages, select one or more of them and then choose SpamSieve - Train as Good from the Script menu.

    Note: On macOS 10.14, the first time you try to train a message macOS will ask for permission to control Outlook and SpamSieve, and you should click OK.

  8. Install Outlook - Filter Mailboxes helper application. To do this:

    1. Click this link to download the Outlook - Filter Mailboxes.dmg file.
    2. Open the Outlook - Filter Mailboxes.dmg file and drag the Outlook - Filter Mailboxes.app file to your Applications folder. If it asks whether you want to replace an existing item, click Replace to replace the old version with the new version.
    3. Drag the Outlook - Filter Mailboxes.dmg file to the trash.
    4. Double-click the Outlook - Filter Mailboxes.app file in your Applications folder. You will need to launch this application whenever you want SpamSieve to monitor Outlook for new messages that need to be filtered.
    5. You can optionally set up Outlook - Filter Mailboxes.app as a Login Item in the Users & Groups section of System Preferences if you want it to launch automatically.

SpamSieve will process new mail automatically every minute, moving good messages to your inbox and spam messages to the Junk folder. Messages yet to be processed will be held in the InboxSpamSieve folders. You can make it check immediately by clicking on the Outlook - Filter Mailboxes icon in the Dock. If you ever need to manually ask SpamSieve to sift through a mix of spam and good messages, select the messages and choose SpamSieve - Move If Spam from the Script menu.

The above is all you need to know about using SpamSieve with Outlook. The Outlook Customization section explains some more advanced setup options. If the filtering doesn’t seem to be working properly, you can check the setup as described in the Checking the Outlook 365 Setup section.

The script page describes some additional advanced features such as checking for new messages more frequently and enabling debug logging.

Finding the Junk Folder

SpamSieve moves both automatically filtered spam messages and trained spam messages to the standard junk mail folders in Outlook. Prior to Outlook 15.36, Outlook had a single top-level folder called Junk E-mail, with per-account folders inside. In Outlook 15.36, there is a separate Junk folder within the section for each account. For more information, please see this thread.

Keyboard Shortcuts

If you would like keyboard shortcuts for the training commands described in Step 7, you can set up the standard SpamSieve keyboard shortcuts as follows:

  1. Download and install FastScripts. (It is free for up to 10 keyboard shortcuts.)
  2. Launch FastScripts.
  3. From the FastScripts icon menu, go to the FastScripts submenu and choose Preferences….
  4. Click on the Script Shortcuts tab.
  5. In the Microsoft Outlook section, double-click on (none) in the Shortcut column next to SpamSieve - Train as Good. It will enter edit mode. Type Command-Control-G to set the shortcut.
  6. In the Microsoft Outlook section, double-click on (none) in the Shortcut column next to SpamSieve - Train as Spam. It will enter edit mode. Type Command-Control-S to set the shortcut.

Outlook 365 and Gmail

If you are using Outlook 365 version 16.17 and a Gmail account, Step 6 above may not work because Outlook may not apply its rules to the messages in your Mail account. Outlook applies rules to accounts that are set up as IMAP accounts:

outlook gmail imap

but not to ones that are set up as Google accounts:

outlook gmail google

To fix this, instead of creating an Outlook rule to move the messages to the InboxSpamSieve folder, you can create a Gmail filter to do this:

  1. From the Gmail Web site, click the gear at the top right, choose Settings, then click on Filters and Blocked Addresses.

  2. Click Create a new filter. Enter {(to:me) (deliveredto:USERNAME@gmail.com)} in the Has the words field (replacing USERNAME with your actual Gmail username).

    outlook gmail filter 1

    Then click Create filter.

  3. Check the Skip the Inbox (Archive it) and Apply the label boxes and select InboxSpamSieve as the label.

    outlook gmail filter 2

    Then click Create filter.

    Note: This will cause spam messages to be temporarily moved to Gmail’s archive, however they should be automatically removed from the archive when you delete them from Outlook. For more information, see Keeping Spam Messages Out of Gmail’s Archive, which shows how to have Gmail not archive messages that are deleted via IMAP.

Using a Generic IMAP Account for Gmail

If you don’t need Outlook to sync with your Google calendar and contacts, you can set up your Gmail account as a regular IMAP account in Outlook. Then you will be able to create an InboxSpamSieve rule for it in Outlook (as well as other, non-SpamSieve Outlook rules if you want). From Preferences ‣ Accounts, click the + button and choose New Account…. After entering your Gmail address, click the Not Google? button.

outlook gmail not google

You can even set up the same Gmail account twice in Outlook, once as Google and once as IMAP, if you want to utilize both Gmail- and Outlook-specific features with it.

Duplicate Calendar Invitations

If you receive calendar invitations by e-mail and have Outlook set to automatically add them to your calendar, Outlook may see a good message that SpamSieve moves back from the InboxSpamSieve folder to Inbox as a new invitation. To prevent a duplicate calendar event from being created, you can set up your Outlook rules to not move the invitation e-mails to InboxSpamSieve. For example, you could add a rule above the SpamSieve rules that moves the invitation messages to another folder.

     Contents  SpamSieve Manual  Technical Support