Sub topic 5
Keeping Mail organized: mailboxes, rules, smart mailboxes, VIPs
This chapter assumes you have at least one account set up in Mail and can open Mail's Settings window. You should know the difference between IMAP, Exchange, and iCloud accounts from the earlier chapters. Here you will learn four tools for sorting mail and how they interact.
The working model
Mail gives you four tools. They answer different questions.
| Tool | Question it answers | Does it move mail? | Where it lives |
|---|---|---|---|
| Mailbox | Where is this message stored? | Yes, a message is in exactly one | On the server or on the Mac |
| Rule | What should happen when a message arrives? | Can | In Mail on this Mac |
| Smart mailbox | Which messages match this search? | No, it is a live view | In Mail on this Mac |
| VIP | Which people matter most? | No, it flags senders | Synced through iCloud |
The key idea is that a mailbox holds messages, while a smart mailbox only shows them. Deleting a message from a smart mailbox deletes the real message from its real mailbox.
Mailboxes
A mailbox is a folder for messages. You create one with Mailbox > New Mailbox. The dialog asks for a location and a name.
- Choose an account such as iCloud or a specific IMAP or Exchange account, and the mailbox is created on the server. Every device signed in to that account sees it.
- Choose On My Mac and the mailbox exists only on this computer. No other device sees it, and it is not backed up by the mail provider.
To nest mailboxes, include a slash in the name. Creating Projects/2026 makes a mailbox called 2026 inside Projects. You can also drag one mailbox onto another in the sidebar.
Messages move between mailboxes by dragging, by Message > Move to, or by the Archive button. For IMAP and Exchange accounts, a move is a server operation, so the message leaves the old folder on every device.
Special mailboxes
Mail maps each account's Drafts, Sent, Junk, Trash, and Archive to a server folder. If your Archive button seems to do nothing useful, select the mailbox you want and choose Mailbox > Use This Mailbox For > Archive. Mail then sends archived messages there.
tell application "Mail"
get name of every mailbox
end tellThis read-only script lists the top-level mailbox names Mail knows about. It confirms that the mailbox you created actually exists.
Rules
A rule is a set of conditions plus a set of actions. Open Mail > Settings > Rules and click Add Rule.
- Give the rule a description.
- Choose whether any or all of the conditions must match.
- Add conditions, such as From contains a domain, Subject contains a word, Account is a specific account, or Sender is VIP.
- Add actions, such as Move Message, Set Color, Mark as Read, Play Sound, or Delete Message.
- Click OK. Mail asks whether to apply the rule to messages already in the selected mailboxes. Say yes only if you want a cleanup.
Order matters
Mail evaluates rules from the top of the list to the bottom. You can drag rules to reorder them. Two rules can both fire on one message. For example, one rule can color a message red and a later rule can move it.
If you want a rule to be final, add the action Stop evaluating rules. Without it, a later rule may undo or conflict with an earlier one. A common mistake is a catch-all rule near the top that moves everything. Rules below it then never see the message in the Inbox.
Rules run on your Mac
Mail rules are client-side. They run only while Mail is open and checking mail on this Mac. Messages that arrive while Mail is closed are not sorted until Mail launches. Your iPhone does not run your Mac's rules, so the same message may look unsorted there, or sorted after the Mac catches up.
Rules that do not fire
When a rule seems ignored, check these causes in order.
- The rule is unchecked in the list.
- An earlier rule matched and used Stop evaluating rules.
- The condition says all where you meant any.
- The rule is scoped to an account other than the one that received the message.
- The message arrived while Mail was closed and was never processed.
Smart mailboxes
A smart mailbox is a saved search. Choose Mailbox > New Smart Mailbox, name it, and set conditions. These resemble rule conditions: Date Received is within the last 7 days, Message is Unread, Sender is VIP, Has Attachments, and so on.
Two options change the results.
- Contains messages that match any/all of the conditions controls the logic, as in rules.
- Include messages from Trash and Include messages from Sent control whether those mailboxes are searched. Both are off by default, which surprises people looking for a message they sent.
Useful examples:
- Unread this week: Message is Unread, and Date Received is within the last 7 days.
- Big attachments: Has Attachments, and Message Size is greater than a chosen value.
- Waiting on a reply: a flagged message whose Sent copy is included.
The results update by themselves. You can drag a smart mailbox into a folder of smart mailboxes in the sidebar, but you cannot drag messages into it, because it does not store anything.
VIPs
A VIP is a sender you mark as important. Hover over a sender's name in a message header and click the star, or use the star shown next to the name. Mail adds the person to the VIPs section of the sidebar. That section lists their messages from all accounts together.
VIPs matter for three reasons.
- Messages from VIPs get a star in the message list.
- You can limit notifications to VIPs under Mail > Settings > General (New Message Notifications), and also in System Settings > Notifications > Mail.
- VIP is a condition in rules and smart mailboxes, so you can build "VIP and unread" views.
The VIP list syncs through iCloud, so it normally appears on your other Apple devices. It matches senders by email address. A person who writes from two addresses needs both starred, or one VIP rule built on the contact's other address.
Choosing the right tool
- Use a mailbox for long-term filing. Pick an account location so it syncs.
- Use a rule for something that should happen automatically, once, as mail arrives.
- Use a smart mailbox for something you want to look at repeatedly without moving mail.
- Use a VIP for people, not topics.
A common pattern combines them. A rule moves newsletters into a Newsletters mailbox and marks them read. A smart mailbox called Today shows everything unread from the last day. VIP notifications keep the Inbox quiet apart from the people who matter.
Common errors
- Mail seems to vanish. It was moved by a rule, often into an On My Mac mailbox. Search all mailboxes or open the rule list.
- Rules apply to old mail too. You said yes to the apply-now prompt. Move the messages back, then edit the rule.
- Smart mailbox is empty. Check the any/all setting, the date condition, and the Trash and Sent options.
- Different results on iPhone. Rules are client-side, so the iPhone has not applied them.
Exercise
You create a rule that moves mail from [email protected] into a mailbox you made under On My Mac. You then notice the messages are missing from webmail. Why, and what is the fix?
Show answer
Moving into an On My Mac mailbox copies the message out of the account and stores it only on this Mac, removing it from the server. Edit the rule to move into a mailbox created under the account (for example iCloud or the IMAP account), then move the messages back from the local mailbox.
Exercise
A smart mailbox named "Waiting" is meant to show flagged messages you sent, but it is empty. Which setting do you check first?
Show answer
Open the smart mailbox's settings and turn on "Include messages from Sent". It is off by default, so sent messages are not searched.
Exercise
Rule 1 colors every message from your company's domain green. Rule 2, below it, moves messages from your manager into a Boss mailbox. Rule 1 also uses "Stop evaluating rules". Why does Rule 2 never run for your manager's mail?
Show answer
Rules run top to bottom. Your manager's mail matches Rule 1 first, and Stop evaluating rules ends processing, so Rule 2 is never reached. Drag Rule 2 above Rule 1, or remove the stop action.