I've enabled the builtin Mail rules to move junk mail directly to the junk folder. But the messages do not get marked as read, so they are shown/counted as unread in the Mail sidebar.

How can I mark mail that goes to Junk and Trash folders as read automatically?

enter image description here

2 Answers 2


For Junk Mail, you can create a Rule. From the menu bar item “Mail”, select > Preferences > Rules > Add Rule. Make a rule with the following conditions:

enter image description here

For Trash, you can simply bypass Mail’s Trash and rely on the server settings of the email account. To do so, from the “Mail” menu bar item (again) > Preferences > Accounts > [select account] > Mailbox Behaviors > uncheck “Move Deleted Messages To the Trash Mailbox”

  • 2
    Tried rules already - not working. Even tried through custom action in Junk mail preferences. Commented Dec 11, 2014 at 11:37
  • @ranklord Remove the custom actions. Revert to default Junk Mail Filters. Quit Mail, then re-open. attempt to rebuild both the Junk and Trash Mailboxes from the “Mailbox” menu bar item > Rebuild. You need to select each mailbox individually beforehand.
    – njboot
    Commented Dec 11, 2014 at 11:42
  • I don't have custom actions anymore since they do not work either :) The problem is that Rules have to be applied MANUALLY, i.e. you select Folder (or set of messages) and then from menu Messages -> Apply Rules. Therefore it solves my problem for 50% only :) Commented Dec 11, 2014 at 11:48
  • @ranklord No, you manually create a rule. The rule does what it’s told to do from then on. You only apply the rule manually if you are applying it to a message that doesn’t meet the criteria laid out when you created the rule.
    – njboot
    Commented Dec 11, 2014 at 11:55

Unfortunately the short answer here is likely to be; you can't.

To understand why, it's important to note that are two places where your junk mail will be filtered out.

Client Side Filtering

The settings you are looking at in Mail are for client-side junk mail filtering, this means that as messages are downloaded from your e-mail provider, Mail will attempt to identify if any are spam, and move them to your Junk mailbox(es).

Messages being filtered in this way should be marked as read if that's the behaviour you have configured under your Junk settings.

Client side filtering often gives you the most flexible control, but the downside is that settings will be specific only to your mail client (Mail.app), so if you access your e-mail on another device, your junk mail may still arrive directly into your inbox.

Server Side Filtering

The other place that junk mail filtering may occur is on your e-mail provider's own mail servers; these will attempt to identify junk and delete or filter it before it is downloaded into Mail. This can be great if properly configured, as it will be consistent across all devices, and usually requires no extra configuration.

However the downside to this is that junk mail filtered by your mail server won't normally be processed by client-side rules, so if the messages aren't marked as read by your server, they won't be marked as read by Mail.app, and at time of writing there is still no way to define a rule that can override this (as Mail does not allow rules to trigger only for messages in a certain mailbox).

Some e-mail providers don't mark junk mail as read by default, and provide no means of customising the behaviour. The most common example I'm aware of (and personally aggravated by) is Microsoft's Outlook 365 (previously Hotmail) service. Even though it offers server-side rules, these don't allow any control of automatically filtered junk mail, so they remain marked as read, despite many, many requests by many, many people to change this.


Unless your mail provider offers you some way to customise server-side filtering behaviour (usually through a webmail interface), then you may be stuck.

However, if the main annoyance for you is that Mail is counting unread junk on its icon, you can change this at least by creating a new Smart Mailbox (Mailbox -> New Smart Mailbox) then create a rule that looks like the following:

enter image description here

Basically you want to match all unread messages, except those in certain mailboxes (in our case Junk), Trash and Sent should already be excluded by default.

Now, under Mail -> Preferences in the General tab, change "Dock Unread Count" to your new smart mailbox, the Mail.app icon now will only show a count of unread messages excluding your junk folder. You can also use a smart mailbox to customise notification behaviour in much the same way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .