If certain emails hit your inbox every single day and you deal with them the same way every time — moving them to a folder, deleting them, marking them read — you are doing manually what a mail rule can do automatically in under a second.
What is a mail rule?
A mail rule is an automated instruction that tells your email app what to do with an incoming message when it matches a condition you set. When an email arrives from a specific sender, contains a certain word in the subject line, or comes from a particular domain, the rule runs instantly — before you ever see the message in your inbox.
Rules can move emails to folders, mark them as read, flag them, forward them, or delete them automatically. You define the condition once. The rule handles every matching email after that, permanently.
Quick answer
On Mac: Open Mail → click Mail in the top menu → Settings → Rules → Add Rule. Set your condition (sender, subject, keyword) and your action (move, delete, mark as read), then click OK. On iPhone: You cannot create rules in the iOS Mail app directly. Instead, open icloud.com in Safari, tap the gear icon → Rules → Add a Rule. iCloud rules run on Apple’s servers, so they work on your iPhone even when the app is closed. Rules set in Mac Mail only run when your Mac is awake and Mail is open.
Steps at a glance
- Decide whether you need a Mac Mail rule or an iCloud Mail rule
- On Mac: Mail → Settings → Rules → Add Rule
- On iPhone: open icloud.com in Safari → request Desktop Website → gear icon → Rules
- Set the condition — sender, subject, keyword, or domain
- Set the action — move, delete, mark as read, or forward
- Click OK and choose whether to apply the rule to existing emails
- Test the rule by sending yourself a matching email
The most important thing to understand before you start
Mac Mail rules and iCloud Mail rules are not the same thing, and the difference matters.
Mac Mail rules run locally on your computer inside the Mail app. They only work when your Mac is awake and Mail is open. If your Mac is asleep, shut down, or Mail is closed, the rules do not run. Emails that arrived while Mail was closed get processed once you reopen it — but there is a delay. According to Apple Support, Mac Mail rules are also available on other Macs if you use iCloud Drive with Mail selected in iCloud Drive options.
iCloud Mail rules run on Apple’s servers. They process every incoming email before it reaches your device — whether your phone is on, off, or in your pocket. iCloud rules are the better choice for iPhone users and for anyone who wants consistent, always-on filtering.
The steps below cover both. Start with the one that matches how you read email.
Fig. 1 — The key difference: Mac Mail rules stop working when your Mac is asleep. iCloud Mail rules run on Apple’s servers at all times. Use iCloud rules if you read most email on your iPhone. Use Mac Mail rules if you want complex multi-condition logic. You can use both simultaneously.
How to set up rules in Apple Mail on Mac
Set up rules in Apple Mail on Mac by opening Mail, clicking Mail in the top menu bar, selecting Settings, clicking the Rules tab, then clicking Add Rule.
Here are the exact steps:
- Open the Mail app on your Mac
- Click Mail in the menu bar at the top of the screen
- Select Settings (on older macOS versions this appears as Preferences)
- Click the Rules tab
- Click Add Rule on the right side
- In the Description field, type a name for the rule — for example “Move newsletters to Reading folder”
- Under If, choose whether any or all conditions must be met
- Set your first condition using the three dropdown fields (see the conditions table below)
- Click the + button to add more conditions if needed
- Under Perform the following actions, set what happens to matching emails
- Click OK
- Mail asks: “Do you want to apply rules to messages in selected mailboxes?” Click Apply to run the rule on existing emails, or Don’t Apply to start fresh from new emails only
Important: Rules in Apple Mail on Mac run in the order they appear in the list. Mail stops applying rules to a message as soon as one rule matches and completes its action. If you have multiple rules targeting the same emails, drag them into priority order — the most important rule goes at the top.

How to set up mail rules on iPhone (using iCloud.com)
Set up mail rules on iPhone by opening icloud.com in Safari, requesting the desktop website, tapping the gear icon at the top of the Mailboxes list, selecting Rules, then tapping the + icon to add a new rule.
You cannot create rules inside the iOS Mail app directly. The rules interface only exists on iCloud.com and in the Mac Mail app. Once you create a rule on iCloud.com, it applies automatically to your iCloud email address on every device connected to your account — including your iPhone.
The exact steps:
- Open Safari on your iPhone
- Go to icloud.com/mail and sign in with your Apple ID
- Tap the aA icon in the address bar → select Request Desktop Website
- Tap the gear icon at the top of the Mailboxes list on the left
- Tap Rules
- Tap the + icon in the top-right corner
- Give the rule a name in the Rule Name field
- Under Message, use the dropdown and text field to set your condition
- Under Action, use the dropdown to set what happens to matching emails
- Tap Add
According to Apple’s iCloud support documentation, new or changed iCloud rules can take up to 15 minutes to take effect on incoming emails. You can create up to 500 rules per iCloud account.

What conditions can you use?
| Condition type | Examples | Best used for |
|---|---|---|
| From (sender) | [email protected] · @linkedin.com | Sorting or deleting emails from one sender or domain |
| Subject contains | “unsubscribe” · “invoice” · “receipt” | Catching promotional or transactional emails automatically |
| To or CC | [email protected] · a team address | Separating emails sent to you vs emails you were CC’d on |
| Message body contains | “newsletter” · “click here to unsubscribe” | Catching promotional content regardless of sender |
| Account (Mac Mail only) | A specific email account in Mail | Separating work and personal email in one app |
| Date received | Before or after a specific date | Processing or archiving old emails in bulk (Mac Mail only) |
What actions can a rule take?
| Action | What it does | Typical use case |
|---|---|---|
| Move to folder | Moves the email out of your inbox into a named folder | Keeping newsletters out of Primary without deleting them |
| Mark as read | Removes the unread indicator automatically | Notification emails you want to keep but not deal with |
| Delete | Moves to Trash immediately on arrival | Promotional emails from senders you cannot unsubscribe from |
| Forward to | Sends a copy to another email address | Routing receipts or invoices to an accounting inbox |
| Flag | Adds a colour flag to the email | Flagging emails from your manager or key clients instantly |
| Mark as junk | Moves to Junk folder and trains the spam filter | Recurring senders that spam filters miss |
Three rules most people find immediately useful
These three rules cover the most common email frustrations. Set them up once and they run permanently.
Rule 1 — Move all newsletters to a Reading folder. Create a condition where Subject contains “unsubscribe.” Set the action to Move Message to a folder called Reading or Newsletters. Now every marketing email bypasses your inbox and waits in one place until you choose to read it — or delete the whole folder at the end of the week.
Rule 2 — Auto-mark notification emails as read. Create a condition where From contains “noreply” or “no-reply.” Set the action to Mark as Read. Notification emails still arrive and stay searchable, but they never show as unread. Your unread count drops to the messages that actually need attention.
Rule 3 — Delete promotional emails from domains you never buy from. If a specific retailer keeps emailing you and the unsubscribe link does not work, create a condition where From contains their domain — for example, @deals.retailer.com. Set the action to Delete Message. Every email from that domain goes straight to Trash without ever appearing in your inbox.
Frequently asked questions
Can you set up mail rules on iPhone?
You cannot create rules directly inside the iPhone Mail app. However, you can set up iCloud Mail rules on your iPhone by opening icloud.com in Safari, requesting the desktop site, and navigating to the gear icon → Rules. These server-side rules apply to your iCloud email address on every device, including your iPhone, and run whether the Mail app is open or not.
What is the difference between Mac Mail rules and iCloud Mail rules?
Mac Mail rules run locally inside the Mail app on your Mac and only execute when the Mac is awake and Mail is open. iCloud Mail rules run on Apple’s servers and process emails before they reach any device — so they work around the clock regardless of whether your Mac is on. For iPhone users, iCloud Mail rules are more reliable because they do not depend on your computer being active.
How do I edit or delete a rule in Apple Mail?
On Mac: open Mail → Mail menu → Settings → Rules tab. Click the rule you want to change, then click Edit to modify it or Remove to delete it. On iCloud.com: go to icloud.com/mail, tap the gear icon, tap Rules, select the rule, and tap Delete Rule. Changes on iCloud.com may take up to 15 minutes to take effect.
Do Apple Mail rules work with Gmail and Outlook accounts?
Rules created in the Mac Mail app work across all email accounts connected to that app — including Gmail, Outlook, and Yahoo accounts. However, these rules only run locally on your Mac. iCloud Mail rules at icloud.com only apply to your iCloud email address — they do not filter Gmail or Outlook emails. For Gmail-specific rules, use Gmail’s built-in Filters at mail.google.com → Settings → See all settings → Filters and Blocked Addresses.
How many rules can I create in Apple Mail?
iCloud Mail supports up to 500 rules per account, according to Apple’s documentation. Mac Mail does not publish a hard limit, but performance degrades noticeably above 50 to 100 active rules. Keep rules focused on your most common email types rather than creating one for every possible scenario.
Do Apple Mail rules run on existing emails or only new ones?
When you create a rule in Mac Mail and click OK, Mail asks: “Do you want to apply rules to messages in selected mailboxes?” Clicking Apply runs the rule immediately on existing emails already in your inbox. Clicking Don’t Apply starts the rule from new incoming emails only. iCloud Mail rules apply to incoming emails only — they do not retroactively process emails already in your inbox.
Key takeaways
- Mac Mail rules run on your Mac only when the Mail app is open. iCloud Mail rules run on Apple’s servers at all times — even when your phone is in your pocket.
- You cannot create rules inside the iOS Mail app. Use icloud.com on a desktop site to create iCloud rules for your iPhone.
- Rules run in the order they appear in Mac Mail. The first rule that matches an email runs — then Mail stops checking the rest. Put your most important rules at the top.
- Three rules cover most inbox frustrations: move newsletters to a folder, auto-mark notification emails as read, and auto-delete persistent senders who ignore unsubscribe requests.
- iCloud Mail rules can take up to 15 minutes to take effect after creation or editing.
Related articles
- How to completely clean up your email inbox →
- How to delete all emails in Gmail at once →
- A 10-minute weekly email reset routine →
- Inbox zero for real people: a system that actually works →
Sources

