Skip to content

Guides

Email Rules and Filters in Gmail, Outlook and iCloud

Step-by-step guide to email filters in Gmail and rules in Outlook, Apple Mail and iCloud, five rules worth having, and when automatic sorting needs more.

7 min read

This article is also available in: Čeština

Emails pass through a funnel and rules sort them

Email rules and filters let your inbox sort itself: when a message matches a condition, such as a specific sender or a word in the subject, the rule acts on it automatically by moving it to a folder, applying a label, marking it as read or forwarding it. Gmail calls them filters, Outlook and iCloud call them rules, and setting one up takes about two minutes.

Below are step-by-step instructions for Gmail, Outlook, Apple Mail and iCloud, plus any IMAP mailbox, a starter set of rules worth having, and the point where rules stop scaling.

How email rules work

Every rule has two parts:

  • A condition — when it applies. For example: the sender is from @yourbank.com, the subject contains "invoice", or the message has an attachment.
  • An action — what happens. Move to a folder, apply a label, mark as read, forward, delete.

Some apps also support exceptions ("unless it's from…") and a stop processing more rules option, so one match doesn't trigger others.

Most rules only apply to new mail. Running them on existing messages is a separate, manual step where it's supported at all.

How to create a filter in Gmail

Gmail builds filters from search:

  1. Click the search options icon on the right side of the search bar.
  2. Fill in the criteria: From, To, Subject, Has the words, Doesn't have, size or attachment.
  3. Click Create filter.
  4. Pick the actions. The most useful pair is Skip the Inbox (Archive it) plus Apply the label, which together work like moving the message to a folder.
  5. To apply the filter to messages you already have, tick the option to also apply it to matching conversations.
  6. Click Create filter again to save.

A shortcut: open a message, choose Filter messages like these from the three-dot menu, and Gmail fills in the sender for you.

All your filters live in Settings under Filters and Blocked Addresses, where you can edit, delete, export and import them.

Tip: the "Has the words" field accepts Gmail search operators. Try "list:" for mailing-list mail, "has:attachment" for messages with files, or "category:promotions" for Gmail's Promotions tab.

How to create rules in Outlook

Outlook comes in several versions and the menus differ slightly, but the logic is the same.

Outlook on the web, Outlook.com and new Outlook for Windows

  1. Open Settings, go to Mail, then Rules.
  2. Click Add new rule and give it a name.
  3. Add a condition, such as From, Subject includes, or Sent to me.
  4. Add an action, usually Move to a folder.
  5. Optionally add an exception and tick Stop processing more rules.
  6. Save. You can also run an existing rule on messages already in a folder.

Classic Outlook for Windows and Mac

The quickest route is to right-click a message and choose Rules. For more complex conditions, open Manage Rules & Alerts and follow the wizard.

Watch out for client-only rules. Rules that depend on the desktop app, such as playing a sound or running a script, only work while Outlook is open on that computer. If you want mail sorted on your phone too, stick to simple conditions and actions the server can run.

Outlook on the web also has Sweep, which moves or deletes all mail from one sender in a single click. It's handy for one-off cleanups.

Apple Mail, iCloud and other IMAP mailboxes

iCloud Mail

  1. Sign in to iCloud.com and open Mail.
  2. Open the mail settings and go to Rules.
  3. Add a rule: choose a condition (from, to, subject contains) and an action, such as move to a folder or move to trash.
  4. Save the rule.

iCloud rules run on Apple's servers, so they sort mail even when your Mac is off and your iPhone shows the result.

Apple Mail on the Mac

In the Mail app, open Settings, then Rules, and click Add Rule. Mac rules are more flexible, but they run on your Mac. If the Mac is asleep, mail arrives unsorted on your other devices.

Any other IMAP mailbox

Many hosting providers offer server-side filters in their webmail, often under Filters and built on a standard called Sieve. Thunderbird has its own message filters, which run in the app. As a rule of thumb, prefer filters on the server: they work regardless of which device you read mail on.

A starter set of rules

Don't start with dozens of rules. These five cover most everyday mail:

  1. Invoices and receipts — subject contains "invoice", "receipt" or "order" → Finance folder.
  2. Banking — sender from your bank's domain → Bank folder.
  3. Newsletters — message contains "unsubscribe" → Newsletters folder.
  4. Shipping and store notifications — sender contains "noreply" or "no-reply" → Later folder.
  5. CC mail — you're not in the To field, only in CC → CC folder.

Base your conditions on the sender's address, not the display name. Anyone can type any name, so a name-based rule is easy to abuse.

When rules stop being enough

Rules are perfect for predictable mail. As your inbox grows, they hit some hard limits:

  • New senders slip through. A rule only knows the addresses and words you wrote into it. A new store or supplier lands straight in your inbox.
  • Maintenance piles up. After a year you have dozens of overlapping rules, and nobody remembers why a message ended up where it did.
  • They don't travel. Gmail filters don't work in Outlook or iCloud. If you have several mailboxes, you build everything several times.
  • Keywords misfire. "Unsubscribe" also shows up in a personal email about cancelling a gym membership.
  • There are caps. Some services limit how many rules you can have or how large they can get.

At that point you want sorting that learns from what you do, instead of you writing every exception by hand.

How InSortio handles it

InSortio connects to your mailbox over IMAP, whether it's Gmail, Microsoft 365 or another provider, and sorts mail right inside it. Without a single rule, it tells people you write to apart from bulk mail and automated notifications. People stay in your Inbox, newsletters go to News and notifications go to Later.

Instead of writing rules, you move a message. Within five minutes InSortio remembers the sender and files their future mail the same way, in every email app and on your phone. For cases where the address isn't enough, it has subject rules (for example "Invoice *" for every supplier), domain rules, and rules with your own conditions, which you can test on recent messages before saving. For every sorted message, you can see why it went where it did.

FAQ

Do rules apply to emails already in my inbox?

Usually only to new mail. Gmail and Outlook can run a rule on existing messages once, if you choose that option when you create or manage the rule.

Why does my Outlook rule not work on my phone?

It's most likely a client-only rule that runs in the desktop app. Simplify the condition and action so the server can run it.

How many email rules should I have?

As few as possible. Ten clearly named rules beat fifty tiny ones. Review them now and then and delete those that no longer match anything.

Can I move my Gmail filters to Outlook?

Not directly. Gmail exports filters in a format only Gmail imports, so you'll need to recreate them in Outlook by hand.

The bottom line

Rules and filters are the quickest way to automatically sort emails that keep coming from the same senders. Start with the five rules above and base them on sender addresses.

When maintaining rules starts eating your time, try InSortio. It sorts based on what you teach it by moving messages, and works the same across all your mailboxes. Everything it does is on the features page.

ShareLinkedInXFacebook

← All articlesMain navigation

You might also like

Tomorrow morning your inbox could be half empty.

Connecting a mailbox takes two minutes. For the first 30 days you get everything, AI included.

  • No credit card
  • Nothing deleted permanently
  • Cancel by disconnecting the mailbox