Short answer: Apple Mail's spam filter lives in Mail > Settings > Junk Mail. Make sure Enable junk mail filtering is on, then choose what happens to junk: leave it in your Inbox marked as junk while you check the filter, or move it to the Junk mailbox once you trust it. Train the filter by clicking the Junk button on spam that gets through and Move to Inbox on good mail it catches. Your email provider runs its own spam filter too.
The settings below are for macOS 27 and are the same in macOS Tahoe 26, Sequoia 15 and Sonoma 14. Older guides point to Mail > Preferences; the menu item is now Mail > Settings.
Two filters: your provider's and Mail's
Most spam never reaches Mail. Apple says iCloud Mail blocks most junk mail, and Gmail, Outlook and Yahoo also filter on their servers, putting spam in the account's junk or spam folder before your Mac downloads it. Apple notes that this can move messages to the Junk mailbox even when Mail's own filter is turned off. Mail's filter is a second layer that runs on your Mac and learns from what you mark.
That matters when you troubleshoot. If good mail lands in Junk with Mail's filter off, the provider put it there, and the fix is on the provider's side (for iCloud Mail, moving it to the Inbox tells iCloud the sender is fine).
Junk Mail settings in Apple Mail
Choose Mail > Settings, then click Junk Mail. Here's what each option does:
| Setting | What it does |
|---|---|
| Enable junk mail filtering | Turns Mail's own filter on or off. |
| Mark as junk mail, but leave it in my Inbox | Highlights junk and adds a banner, but leaves it in the Inbox. Best while you check how accurate the filter is. |
| Move it to the Junk mailbox | Moves junk out of the Inbox automatically. Best once you trust the filter. |
| Perform custom actions | Lets you click Advanced and set your own conditions and actions, such as deleting junk. |
| Sender of message is in my Contacts | Never treats mail from your contacts as junk. |
| Sender of message is in my Previous Recipients | Exempts people you've emailed before. |
| Message is addressed using my full name | Exempts mail that uses your full name, which spam rarely does. |
| Trust junk mail headers in messages | Uses the spam verdicts your provider adds to messages. |
| Filter junk mail before applying my rules | Runs the junk filter first, so your rules can't move spam out of reach of it. |
| Reset | Restores the default criteria and deletes everything Mail has learned from you. |
If you pick Perform custom actions, Apple advises keeping the default condition "Message is junk mail" so Mail still uses what it has learned.
How to mark email as junk (and not junk)
- Junk: select the message and click the Junk button in the toolbar, choose Message > Move to Junk, or press Shift-Command-J. Mail moves it to the Junk mailbox.
- Not junk: click Move to Inbox in the banner on the message, or select it in the Junk mailbox and click the Junk button again. Dragging it to the Inbox works too.
Each time you confirm a message either way, Mail's filter gets better at telling the two apart. With iCloud Mail, marking a message also teaches iCloud's server filter, and future mail from a sender you marked as not junk goes to your inbox.
Clean out the Junk mailbox automatically
- To empty it now, choose Mailbox > Erase Junk Mail (Option-Command-J).
- To empty it on a schedule, choose Mail > Settings, click Accounts, select the account, click Mailbox Behaviors and set Erase junk messages. Apple suggests anything other than Never, so junk doesn't eat into your storage.
- iCloud Mail deletes messages in Junk after 30 days on its own.
Skim the Junk mailbox before you erase it, at least for the first few weeks.
Block senders
The junk filter guesses. Blocking is certain. To block someone, select one of their messages, move the pointer next to their name in the header, click the arrow and choose Block Sender. Then decide what happens to their mail in Mail > Settings > Junk Mail > Blocked: select Enable blocked mail filtering, then choose Mark as blocked mail, but leave it in my Inbox, or Move it to the Trash. Manage Blocked Contacts opens the full list in System Settings > Privacy & Security. You can block up to 3,000 senders.
For newsletters you signed up for, unsubscribing is better than blocking; see how to unsubscribe in Mac Mail.
Why spam still gets through (and good mail goes to Junk)
- The filter hasn't learned enough yet. Keep marking. The more consistently you do it, the better it gets.
- Spam comes from new addresses. Blocking one sender doesn't stop the next. Mark it as junk instead, so Mail learns the pattern.
- A rule moved it first. Turn on Filter junk mail before applying my rules.
- Good mail lands in Junk. Add the sender to Contacts (Message > Add Sender to Contacts) and keep the Contacts exemption on, then click Move to Inbox.
- The filter seems broken. Click Reset in Junk Mail settings. It wipes what Mail has learned, so treat it as a last resort.
Cut down on spam in the first place
- Don't open obvious junk. Apple warns that opening it can tell spammers your address is active.
- Keep Protect Mail Activity on in Mail > Settings > Privacy. Apple says spammers use image loading to check whether an address is active, and this setting keeps remote content from giving you away. Mail never shows remote content in junk.
- Use an alias for sign-ups. iCloud Mail has email aliases, and iCloud+ adds Hide My Email.
- Never reply to spam or use its unsubscribe link.
Spam that pretends to be your bank or Apple is phishing. Our guide to spotting phishing emails explains what to look for, and checking the headers shows where a message really came from.
Want an inbox that sorts itself?
Disclosure: we make Canary Mail. If spam and phishing are what wear you down, an app built around security can take some of the load. Canary Mail is an email app for Mac, iPhone, iPad, Windows and Android that works with Gmail, Outlook, iCloud, Yahoo, Exchange and other IMAP accounts. The free plan covers unlimited accounts on 2 devices with AI inbox sorting, and the triage runs on your device. Tracker blocking is on by default, and your email isn't used to train AI. The Pro+ plan ($100 a year) adds phishing and impersonation detection. More than 2 million people use it, and Apple has featured it on the App Store and the Mac App Store.
Frequently asked questions
Does Apple Mail have a spam filter?
Yes. Mail has its own junk filter under Mail > Settings > Junk Mail, and your email provider filters spam on its servers as well.
How do I turn off the junk mail filter in Apple Mail?
Go to Mail > Settings > Junk Mail and deselect Enable junk mail filtering. Your provider may still move messages to the Junk mailbox, which you can only change in its own settings.
Why do I keep getting spam after blocking senders?
Spammers change addresses all the time, so blocking catches only one. Mark spam as junk so Mail's filter learns, and keep Move it to the Junk mailbox selected.
How do I stop good emails going to Junk on my Mac?
Click Move to Inbox on the message, add the sender to Contacts, and keep the exemption for senders in your Contacts turned on in Junk Mail settings.
Where is the Junk folder in Mac Mail?
In the Mail sidebar, under each account. You can choose which mailbox an account uses for junk in Mail > Settings > Accounts > Mailbox Behaviors.
More Mac Mail guides
- How to sort messages in Mac Mail
- How to show full message headers in Mac Mail
- How to unsubscribe from emails in Mac Mail
- How to archive emails in Mac Mail
- How to spot phishing emails
Other Mac Mail fixes
- Mac Mail not opening or freezing
- Mac Mail keeps crashing
- Mac Mail not sending emails
- Messages stuck in the Outbox
- Mac Mail not receiving emails
- Mac Mail inbox not updating
- Mac Mail can't connect to the server
- "Unable to verify account name or password"
- Mac Mail not showing attachments
- Mac Mail not showing images
- Mac Mail search not working
Sources
- Apple Mail User Guide (macOS 27): Change Junk Mail settings
- Apple Mail User Guide (macOS 27): Reduce junk mail
- Apple Mail User Guide (macOS 27): Change Blocked settings
- Apple Mail User Guide (macOS 27): Change Mailbox Behaviors settings
- Apple Mail User Guide (macOS 27): Keyboard shortcuts
- Apple: Report and reduce spam in iCloud Mail
- Apple Mail User Guide (macOS 27): Change Privacy settings