How to Filter Spam With Apple Mail

Keep junk mail out of sight and out of your inbox

E-mail and spam concept

scanrail / Getty Images

Apple Mail's built-in junk mail filter is pretty good at determining what is and isn't spam. The default settings work great right out of the box, and you should give the spam-fighting tools built into Mail a try before making a change.

Once you've tried the basic junk mail system out, you can fine-tune it to meet your needs by customizing the settings.

These instructions apply to all versions of Apple Mail.

Turn on Junk Mail Filtering

You'll find the Junk Mail settings in Mail's Preferences menu.

  1. To view or edit the junk mail filter, select Preferences from the Mail menu.

    The keyboard shortcut to open Preferences is Command-comma.

    Mac OS X Mail with the Preferences option highlighted
  2. Click the Junk Mail icon.

    Apple Mail preferences with the Junk Mail tab highlighted
  3. Check that the box next to Enable junk mail filtering has a checkmark in it.

    Junk Mail preferences in Apple Mail with the box next to
  4. You have three basic options for how Mail can handle junk:

    • Mark as junk mail, but leave in my inbox. This setting lets you check the messages Mail marks as junk without having to leave your inbox. It's a good setting to use when you first start filtering junk so that you can easily see which messages Mail is applying its rules to.
    • Move it to the Junk mailbox. Mail can move suspected junk mail to the Junk mailbox. If you're new to using Mail, you might choose this option until you feel comfortable about its accuracy.
    • Perform custom actions (Click Advanced to configure). Finally, you can set up additional filters to perform custom actions on junk mail.
    Apple Mail's Junk preferences with the filtering options highlighted
  5. You also have three options to exempt messages from the junk filter.

    • Sender of message is in your Address Book or Contacts app. This option stops the filter from grabbing messages from people you know.
    • Sender of message is in your Previous Recipients.​​ The spam filter won't mark messages from people you've emailed before.
    • Message was addressed using your full name. ​Most spammers don't know your full name and are more likely to send messages using just the first part of your email address hoping it's your first or last name.

    It's generally safe to check all three categories, but you can deselect any or all of them if you prefer.

    Apple Mail's Junk Mail preferences with the exception options highlighted
  6. You have two more options to consider at this level. ​

  • Trust junk mail headers in messages. Many ISPs or spam mail services you may be using add a junk mail header to the email message before sending it along to you. This setting tells Mail to assume the header is correct and assign it as junk.
  • Filter junk mail before applying rules. If you're using Mail rules, a method to automate everyday routine mail tasks, you can have Mail keep the junk from passing through your Mail rules.
Junk Mail preferences in Apple Mail with extra filtering options highlighted

Custom Junk Mail Filtering Options

Aside from the default options, you can also apply extra rules that decide when the junk filter grabs a message.

  1. On the Junk Mail tab in Preferences, click the Perform custom actions radio button, and then click Advanced.

    Apple Mail's Junk Mail preferences with the
  2. Setting up custom filtering options is similar to creating rules for other mail. You can tell Mail what it should do with messages that meet the conditions you set.

    First, specify whether any or all of the conditions you specify must be met. Your options are all or any.

    Junk Mail advanced settings in Apple Mail
  3. Click the drop-down menus to decide how you want to filter your mail. Add more conditions by clicking the plus (+) button on the right side of the window, or click the minus (-) button to remove ones you've set.

    Junk Mail advanced options in Apple Mail with the plus and minus buttons highlighted
  4. Use the pop-up menus under the Perform the following actions section to tell Mail how it should handle messages that meet the conditions you specified.

    This line also has plus and minus buttons that tell Mail to perform multiple actions with messages that meet the conditions.

    Apple Mail's Advanced settings for Junk Mail
  5. When you're satisfied with the settings, click OK.

    Junk Mail advanced settings with the OK button highlighted

How to Mark Mail as Junk or Not Junk

The filters don't always work correctly, and you may have to mark messages as spam manually. Apple Mail can also mistakenly flag messages you want to read. Here's how to fix those mistakes.

  1. In your inbox, click on a junk message to select it.

    Apple Mail inbox with a message selected
  2. Click the Junk icon to mark it as junk mail.

    Mail highlights junk mail in brown, so it's easy to spot.

    Apple Mail inbox with the Spam button highlighted
  3. Conversely, if you look in the Junk mailbox and see that Mail tagged a legitimate email message as junk mail by mistake, click once on the message, click the Not Junk icon to re-tag it, and then move it to the mailbox of your choice.

The Not Junk Mail button is in the same place as the Mark as Junk button.

It's worth scanning the Junk mailbox before you empty it to make sure you don't miss anything important. The easiest way to do this is to sort messages in the Junk mailbox by subject.

So many spam messages have similar subject lines that this speeds up the process of checking them. You can also sort by the sender because many spam messages have names in the From field that are obviously bogus. But there are enough legitimate-sounding names to require double-checking the subject line, which takes more time than just checking by subject in the first place.