Filters and rules
A filter is an if-then rule: if an email matches something you described, then meil does something with it — flags it, moves it to a folder, applies a label.
Your rules run on the mail server, the moment the message is delivered. You do not need onmeil.eu open in a browser. A message that arrives while you sleep is already sorted when you pick up your phone, and it is sorted the same way everywhere — in the browser, in Outlook, in Apple Mail, on mobile.
You'll find filters under Settings → Spam and filters.
Creating a rule
- Go to Settings → Spam and filters
- Scroll down to New filter
- Type a name in Rule name. The name is just for you, so you can recognise the rule in the list
- Fill in one or more criteria under If the email matches:
- Sender contains — who the message is from
- Received at address — which of your addresses it was sent to
- Subject contains — text in the subject line
- Tick what should happen under Do the following:
- Press Create rule
The rule applies from the next email that arrives.
Every criterion must match
If you fill in both sender and subject, both have to match before the rule fires. To catch two different things, create two rules.
How your text is interpreted
You don't need to write out a whole address. meil picks the comparison for you, based on what you type:
| What you type | What it means | Example |
|---|---|---|
| A word or part of an address | Contains — matches anywhere in the field | nyhetsbrev matches nyhetsbrev@butikk.no |
| A complete email address | Exactly that address, nothing else | anna@firma.no matches only Anna |
Text with * or ? | Pattern. * stands for anything, ? for a single character | *@firma.no matches everyone at firma.no |
Upper and lower case make no difference.
"Received at address" does more than it looks like
This field looks at the address the message was actually delivered to — not only at what the To: header says. That does two useful things:
- Aliases and role addresses. If
salg@firma.nois an alias into the same inbox, you can file everything sent there into its own folder without mixing it with your personal mail. - Mail forwarded from another service. When you forward from an old address at another provider, they often rewrite the delivery address to your meil address. meil then reads the
To:header instead, where the original address is still present, and the rule still matches.
Carbon copies
The field looks at the main recipient, not at Cc. That is deliberate: several services rewrite the Cc field in transit, and a rule that relied on it would fire on the wrong mail.
What the actions do
| Action | What happens |
|---|---|
| Flag | Stars the message |
| Mark as read | The message arrives already read, with no notification |
| Apply label | Attaches one of your labels to the message |
| Move to folder | Files the message straight into the folder you pick, instead of the inbox |
| Hide from inbox | Files the message in Archive. It is not deleted — it stays searchable and where you expect it |
You can combine several actions in one rule. They run in the order above, so a single rule can flag, label and move the same message.
"Move to folder" and "Hide from inbox" end the processing
Once a message has been moved, meil stops evaluating further rules for that message. Rules further down the list do not run on it.
So set the flag, the read marker and the label in the same rule as the move — not in a rule below it, because that one is never reached.
Order
Rules are evaluated top to bottom. The first rule that moves the message ends the processing; rules that only flag or label let the message carry on to the next rule.
The order follows the order you created the rules in. New rules go at the bottom, and the list cannot be dragged into a different order. To move a rule earlier, delete it and create it again.
What happens before your rules
Your rules are the last link in a chain. The order is deliberate, and worth knowing:
- Forwarding — the copy is sent on first, so a rule that moves the message never stops the forward
- Paused or blocked privacy addresses are rejected
- Vacation responder replies
- Privacy addresses are routed to their folder
- Your rules
So forwarding and the vacation reply always happen, whatever your rules do afterwards.
Rules apply to new email
A filter handles messages as they arrive. It does not go back and tidy up mail you already have.
To sort old email, use search and bulk actions once, and let the filter take everything from now on.
Turning off, changing or deleting
- Turn off temporarily: clear the checkbox next to the name. The rule stays in the list but stops running immediately.
- Delete: press ✕ on the rule card and confirm. It stops working right away.
- Change: rules cannot be edited today. Delete the rule and create a new one with the criteria you want.
Rules you did not create
If you have set up a custom domain with a catch-all address, meil creates a rule for it automatically. It is named after your domain, matches all addresses at that domain, and moves the mail to the folder you chose during setup.
That rule runs before your own, and it excludes the addresses that actually exist on your account — so mail to anna@firmaet.no lands in Anna's inbox, not in the catch-all folder. You can switch it off like any other rule.
Examples
Newsletters out of the inbox, but not away
- Sender contains:
nyhetsbrev - Do: Apply label
Nyhetsbrev+ Hide from inbox
Everything to the support address in its own folder
- Received at address:
support@firmaet.no - Do: Move to folder
Support
Make invoices easy to find
- Subject contains:
faktura - Do: Flag + Apply label
Økonomi
Note that this last one moves nothing. The message stays in the inbox and carries on to the next rule.
Receipts from one particular shop
- Sender contains:
*@nettbutikken.no - Subject contains:
ordrebekreftelse - Do: Move to folder
Kvitteringer
When something doesn't work
"The rule is saved, but not yet active on the mail server." The rule is safely stored with meil, but it has not been pushed to the mail server, so it is not running yet. Wait a moment and save again. If the message persists, contact support — do not recreate the rule, it already exists.
The rule doesn't match Check that every criterion really matches at the same time — they have to match together, not one at a time. Remember too that a rule only applies to email arriving after you saved it.
A rule far down the list never runs Then a rule above it is probably moving the message first. See Order.
Mail ends up in spam instead The spam filter assesses the message before your rules. See Spam.
Under the hood
meil translates your rules into Sieve — the mail filtering language standardised by the IETF in RFC 5228. The script is executed by the mail server at delivery time. That is why the rules behave identically in every app, including when you are not signed in anywhere.
meil manages the script
Your filter script is regenerated every time you change a rule, a forward or an alias. That script is called meil, and you should not edit it yourself — the changes disappear the next time anything is saved. If you want to write your own rules in Sieve, put them in a separate script that meil never touches: see Your own Sieve rules.
See also
- Block a sender — stop someone entirely, not just sort them
- Spam — automatic spam protection
- Labels and Folders — what the rules sort into
- Forwarding and Aliases