Email can be a wonderful thing. Hearing the notification sound from the Mail app and seeing that those tickets you ordered are on their way, relatives announcing there’s a new addition to the family, or a reminder from your partner to pick up some wine on the way home so you can attempt the things that cause the creation of new family members, can brighten any day.

Sadly, of course, this isn’t always the case as spam can shatter your peaceful oasis with frightening alerts of stolen account details, entreatments from Nigerian royalty, or offers of miraculous growth potential in a number of anatomical areas. Thankfully Apple’s Mail app in OS X has a built-in spam/junk mail filter system that allows you to gain control of your inbox once more. Setting it up is easy and we’ll show you how in this tutorial.

Related items:

Using Apple Mail’s Junk Mail filter

To find the Junk Mail filter you’ll need to open up Mail then go to the menu bar at the top of the screen click Mail then select Preferences from the drop-down menu.

How to filter spam in Mac Mail

This opens up a new window containing all of the various settings for Mail. You’ll notice tabs along the top of the window, one of which is marked Junk Mail. Click this to see the Junk Mail filter options.

how to filter spam in Mac Mail

At the top is the essential tick box marked ‘Enable junk mail filtering’, and the chances are that it’s already turned on by default. If that isn’t the case then be sure to click the box so that a tick appears.

Beneath this are a number of other options that can tailor how the filtering system operates. These are broken into two main sections. The first is ‘When junk mail arrives’ and of the three settings available within we’d recommend choosing ‘Mark as junk mail, but leave it in my Inbox’.

The advantage this has over the ‘Move it to my Junk mailbox’ option is that when Mail receives any missives that it thinks might be junk, but is unsure, it will show them in your inbox, marking them in brown to indicate their potentially hazardous nature. When you open these items you’ll see a message along the top of the email that states ‘Mail thinks this message is Junk Mail’ and a button on the right side marked ‘Not Junk’.

how to filter spam in Mac Mail

If the mail is a valid one that you want to receive then click the button and Mail will learn to let these kind of items through in the future. Any emails that fit the classic spam mould will be filtered out automatically, saving you having to approve the process.

The last option open to you is ‘Perform custom action (Click Advanced to configure)’ but as this involves setting up rules and conditions that can get quite complicated and actually risk you losing emails if you get things wrong, we’ll save that for another tutorial.

The second section in Junk Mail settings is entitled ‘The following types of messages are exempt from Junk Mail filtering:’ and list three options which include when the sender is already in your contact list, had been sent email by you before, or uses your full name in the email. You can adjust these if you like, but we’ve found that leaving them all ticked is usually the best solution for most people. The same is true for the last two settings at the bottom of the box, the first of which should be ticked and the latter left alone.

Fine tuning the Junk Mail filter

While Mail does a decent job of sorting the wheat from the chaff there will sometimes be items that creep into the wrong inbox. If you have a junk mail appear in your main inbox, and not marked in brown by Mail, then it’s easy to reclassify the offending article. Select the item then go to the row of icons at the top of the screen and click the thumbs-down button. This will mark the email as spam and move it directly into the Junk folder.

how to filter spam Mac Mail

It’s wise to check your Junk folder periodically to see if there have been any real emails accidentally filtered there. If you should discover such an event then select the email then go to the menu bar at the top of the screen and select Message>Move to>Inbox.

How to filter spam Mac Mail

Over time Mail should then do this automatically now that you’ve set a precedent.

Using a third party spam filter

Spamsieve blocklist

If you find that Mail’s filter is not enough for you then you could consider investing in a third-party option. One long-time favourite is C-Command SpamSieve which adds a Bayesian spam filtering system to Mac Mail alongside a massive list of rules for determining junk items. It can be a little tricky to set up in the first instance (as it requires you to create Rules in Mail), but there is a step-by-step process by C-Command in the SpamSieve manual.

Avoiding the traps of spam emails

Filters and security settings are all well and good, but there is always going to be gaps in the system. True, this isn’t the end of the world, and you can manually move annoying emails without too much fuss, but there is a darker side to spam.

Often spam emails are used to steal financial information or to deposit malware on your computer. If the worst happens and covert spam does make it to your Inbox then it’s very important that you apply some simple rules to protect against being tricked into giving up sensitive information about yourself or financial accounts.

For example banks or online payment services such as Paypal will never email you saying your account details need to be updated, or there is a problem on your account, and then ask you to click a link that will take you to its site so you can enter your details.

This is called a Spear phishing attack as is commonly used to steal data from unsuspecting victims. The emails will often feature the logos of the organisation, the same fonts, look quite convincing, and convey a sense of urgency, but don’t trust them. If you fear there might be a problem with your account then open your browser, go directly to the website and log in manually.

Basically never click a link in a email that takes you to a login page.

The other common attack is to send through a document or image file and ask you to open it. This could be from a friend, relative, or colleague and usually says something cryptic or enticing such as ‘You’ll never believe this image!’. Of course this could be a real email, but before clicking on anything just consider whether the person sending the item would write something like that or include unsolicited attachments? If you’re not sure then try sending them a quick message asking if they really did send the item. It’s a small inconvenience, but it could save you a lot of headaches.

Yes it’s true that Macs are not as susceptible to malware and viruses as their PC counterparts, but they are not invulnerable. So stay safe and don't make it easy for the naughty people.