How to Filter Spam With Apple Mail

Keep Junk Mail Out of Sight and Out of Your Inbox

Spam in Mailbox
Creativ Studio Heinemann | 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 I certainly suggest you give the spam fighting tools built into Mail a try before making change. but once you have tried the basic junk mail system out, you can fine tune it to meet your needs by customizing the settings as needed.

Turn On Junk Mail Filtering

  1. To view or edit the junk mail filter, select Preferences from the Mail menu.
  1. In the Mail Preferences window, click the Junk Mail icon.

Your first choice is whether or not to enable the junk mail filter. We can't imagine choosing not to use the junk mail filter, but maybe there are a few lucky individuals out there who manage to fly under the radar of spammers.

There are three basic options for how Mail can handle junk mail:

  • Mark as junk mail, but leave in my inbox. This setting allows you to check the messages the mail has marked 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 it's junk rules too.
  • Move it to the Junk mailbox. Mail can move suspected junk mail to the Junk mailbox. This is the setting we recommend for most users, however, if you're brand new to using Mail, you might choose to have it mark junk mail as such but leave it in your inbox, until you feel comfortable about its accuracy. If you choose to have junk mail sent directly to the Junk mailbox, you can still check to be sure nothing was miscategorized before you empty the mailbox and send the junk into oblivion.
  • Perform custom actions (Click Advance to configure). Finally, you can set up additional filters to perform custom actions on junk mail (unfortunately, unleashing a plague on the sender isn't one of the options.) We'll get back to custom actions in a minute.

There are three categories of messages that can be exempt from junk mail filtering at this level:

  • Sender of message is in my Address Book or Contacts app.​ If the sender is someone you have added to your Address Book or Contacts app, it is probably a safe bet that they are not people who routinely spam you.
  • Sender of message is in my Previous Recipients.​​ Previous Recipients is a list of email addresses that Mail keeps track of. The concept is if you have answered a query from someone who sent you a message, or you have sent a message to a person, then you probably want to hear from them and the messages they send should be exempt from being marked as spam.
  • Message was addressed using your full name. ​Most spammers don't know your full name and or more likely to send messages using just the first part of your email address hoping that is 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.

There are two more options 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 mail from passing through your Mail rules. If you're not familiar with Mail rules, check out the following two articles:

    Set Up Apple Mail Rules

    Take Control of Your Email in Mail

    Custom Junk Mail Filtering Options

    1. To access the custom junk mail filtering options, select Preferences from the Mail menu. In the Mail Preferences window, click the Junk Mail icon. Under "When junk mail arrives," click the "Perform custom actions" radio button, and then click Advanced.
    2. Setting up custom filtering options is similar to setting up rules for other mail. You can tell Mail how it should handle mail, in this case, junk mail, that meets certain conditions.
    3. First, you can specify whether any or all of the conditions you specify must be met.
    1. The conditions you set are really a personal preference sort of thing, and there are many options to choose from, so we're not going to go through them all. If you click on each of the pop-up menus, you can decide how you want to filter your mail. You can add more conditions by clicking the plus (+) button on the right side of the window, or delete conditions by clicking the minus (-) button.
    2. 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.
    3. When you're satisfied with the settings, click OK. You can come back and tweak these settings at any time if you find that Mail is being either an under- or overachiever when it comes to filtering junk mail.

    You can also skip the custom options sections entirely. We find the standard options do just fine, but everyone has their own preferences for how they want to handle email.

    How to Mark Mail as Junk or Not Junk

    1. If you look in Mail's toolbar, you'll see a Junk icon, which sometimes changes to a Not Junk icon. If you receive a piece of email that slipped past Mail's junk filter, click once on the message to select it, then click the Junk icon to mark it as junk mail. Mail highlights junk mail in brown, so it's easy to spot.
    2. 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.

    Mail has a built-in junk filtering database that learns as you go along. It's important to identify Mail's mistakes, so it can do a better job in the future. In our experience, Mail doesn't make an awful lot of mistakes, but it does make a few now and then, enough that 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 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.