Customize when Mac Mail automatically deletes junk emails (spam messages)
When you have added an email account to Mac Mail, it will automatically check on the server for new email messages: most of them will be downloaded to your Inbox, and fishy ones (or deemed so by Mail) will be placed inside the Junk email folder. Since legitimate emails can be accidentally filtered out as spam, Apple Mail will by default keep these emails in the Junk folder indefinitely, and let you take care of deleting them manually. But this setting can be customized, just like you can configure Mail to keep or erase sent messages.
Configure Apple Mail spam deletion settings
Follow these steps to change how Mail handles spam messages in your Junk folder:
- To customize Apple Mail, click on the Mail menu, and choose "Preferences":

- When the options window opens, select the Accounts tab: Mail lets you keep a separate setting for each email account, which means that when you customize that setting, it needs to be applied to each email account, one after the other, but this is a good thing:
• In an email account you use for online forums or "junk" account when websites insist that you register to view content, you can set Mac Mail to automatically delete perceived spam without a second thought.
• For a work or business email account, however, you will want to make sure that spam is never automatically deleted, to avoid missing emails from prospects (and giving the impression that you are ignoring their emails!) - Click on the email account you want to configure (if a single email account is setup, it will automatically be selected).
- Now click on the Mailbox Behaviors tab on the right hand side:

- The third group of settings, labeled "Junk", includes a "Erase messages in the junk mailbox when" dropdown menu: click on it.
- "One day old", "One week old", and "One month old" will instruct Mac Mail to wait that period from the sent date of the email in question before permanently deleting it.
- To automatically delete spam, select "Quitting Mail", and Apple Mail will then automatically purge your Junk mailbox when you close the application - this care-free option is not one we recommend for "important" email accounts.
- Note that you can always come back later and change that setting back to "Never", or another value. Close the Preferences window and click on the Save button to retain your latest change.
And this is how you make Mac Mail automatically delete spam from your junk mailbox!