Mail rules and out of office
Two things happen to a message on the mail server before anyone opens a mail client: your Mail Rules sort it, and — if the mailbox has one switched on — an Out of Office reply answers it. Both run on the server, so they work whether or not a computer, phone or webmail session is open, and both belong to a single mailbox rather than to the mailspace as a whole.
This guide covers building rules for a mailbox, ordering them, and setting up an out-of-office reply. Creating the mailboxes themselves is Managing mailboxes.
Before you start
- A finished mailspace. These screens need the mailspace to be verified and set up on the mail server. Until it is, the dashboard sends you to the domain verification page instead — see Verifying your domain.
- At least one mailbox. Rules and replies attach to a mailbox. With none, the Mail Rules page shows No mailboxes yet — Create a mailbox first, then give it rules. — and offers New Mailbox.
- A role that can edit this workspace. Creating, editing, reordering, turning off and deleting rules, and saving or removing a reply, are all edit actions. A member whose role can't edit is turned back with You do not have permission to perform this action.
- A mailspace that isn't on hold. A mailspace scheduled for deletion is read-only — This mailspace is scheduled for deletion and can't be changed. Restore it first.
- If Mailspace isn't in your workspace sidebar at all, mail hosting isn't switched on for the dashboard. Get in touch and we'll sort it out.
The two rule screens
Open the mailspace, then the Settings menu in its sidebar. Two entries there matter here:
- Mail Rules — a list of every mailbox in the mailspace, headed Mailboxes: Rules sort incoming mail automatically — move it to a folder, forward it, mark it read or delete it. Each mailbox has its own set. It is a picker, not a set of rules: columns for Mailbox, Rules and Out of office, and a Manage rules button per row.
- Out of Office — the automatic replies, one row per mailbox that has one.
Neither screen overrides the other, and there is no mailspace-wide rule that runs ahead of a mailbox's own. Every rule lives in exactly one mailbox; the Mail Rules list only routes you to the right one. The Rules column summarises what it finds there — None, a {n} active rules badge counting the rules that are switched on, or a Custom script badge. Those figures are a cached summary, as the footer says: Counts come from the last time each mailbox's rules were opened or saved here. Open the mailbox to see the current state.
The mailboxes list has the same shortcut: open a row's actions menu (the ⋮ button) and choose Mail rules, which lands on that mailbox's rules — the same screen Manage rules opens. A mailbox scheduled for deletion isn't offered on either route.
What a rule can match
A rule has one or more Conditions: What the rule looks for in an arriving message. Each condition is a field, a comparison and a value.
| Field | Matches against |
|---|---|
| From, To, Cc | the sender and recipient headers |
| Subject | the subject line |
| Body | the message text — this one offers only contains and is |
The comparisons for From, To, Cc and Subject are contains, does not
contain, is, is not, starts with, ends with and matches. The list swaps itself
when you change the field, keeping your comparison if the new field still offers it.
matches treats the value as a pattern rather than plain text, where * stands for any
run of characters — which is how starts with and ends with are built underneath.
One condition row can carry several values: the placeholder reads Value — separate several with commas, and the row matches if any of them does. Several separate rows are combined by Match type instead — Match ALL conditions or Match ANY condition, where ALL requires every condition to match; ANY fires on the first one that does.
What a rule can do
Actions are What happens to a message that matches, and a rule can have more than one:
| Action | Effect |
|---|---|
| Move to folder | files the message into a folder instead of the inbox |
| Forward to address | sends a copy on to another address |
| Mark as read | delivers it already read |
| Star | flags it |
| Delete | throws the message away |
Move to folder offers the mailbox's real folders under Select folder, plus New folder… — pick that and type a name, which is created on first delivery rather than straight away. Forward to address takes a single email address and is checked as one when you save.
Delete keeps nothing
A rule whose action is Delete discards the message on arrival: it is never delivered to the mailbox, so there is nothing left in a folder to move back, and the sender is not told — no bounce. Prefer Move to folder unless you are certain, and check Mail logs if you need to see what a rule has been catching.
Create a rule
-
Open the mailbox's rules. From Settings → Mail Rules, click Manage rules on the mailbox's row. The page is headed Mail Rules with the address above it, and its card is Rules — Applied top to bottom as mail arrives. A rule that stops processing keeps the ones below it from running. With none yet it reads No rules yet — Sort newsletters into a folder, forward mail from a client, or bin what you never want to read.
-
Start a new rule. Click New Rule. All mailboxes beside it goes back to the picker.
-
Name it. Rule name is required and Shown in this mailbox's rules list. — for example Sort newsletters.
-
Choose the match type. Match ALL conditions or Match ANY condition. All is the default.
-
Add your conditions. Set the field, the comparison and the value on the first row, and use Add condition for more. The trash button on a row removes it; the last row stays, because a rule needs at least one condition.
-
Add your actions. Pick from the action list, and fill in whatever it asks for — a folder, or an address. Add action adds another row, and again the last one stays.
-
Decide whether it ends there. Stop processing is a switch: Rules run top to bottom. Turn this on and the rules below this one are skipped whenever it matches. Leave it off and matching mail carries on through the rest of your rules.
-
Read it back. In plain words shows the rule as a sentence and keeps up as you edit — How the rule reads as you build it. It is the quickest way to catch a condition pointed at the wrong field.
-
Save it. Create rule saves and returns to the list; Cancel leaves without saving. If something is missing — a blank value, an address that isn't an address — the form comes back with the reason and keeps what you typed, rather than saving a rule that would quietly match nothing.
Editing an existing rule is the same form, reached from the row's ⋮ menu via Edit rule, and saved with Save changes.
Order, pause and remove rules
Rules run in the order they are listed, and the list is numbered so you can see it. Each row shows the rule's name, its conditions and actions in plain words, and an On or Off badge. The row's ⋮ menu holds the rest:
- Move up / Move down — order is a real setting, not presentation. A rule with Stop processing on decides what the rules under it ever see.
- Turn off / Turn on — a rule that is off stays in the list and stops running. It also stops counting toward the active rules figure on the Mail Rules picker.
- Delete rule — asks to confirm, and notes that Mail already filed by this rule stays where it is. Rules act on mail as it arrives, so removing one never moves anything back.
Set up an Out of Office reply
-
Open Out of Office. In the mailspace sidebar, Settings → Out of Office. The card is Automatic replies sent to incoming mail while a mailbox owner is away., and with none set up it reads No out-of-office replies configured.
-
Start a new reply. Click New Out of Office — in the page header once you have at least one, and in the empty state before that.
-
Choose the mailbox. Email address is The mailbox this auto-reply answers for., chosen from Select a mailbox…. One reply per mailbox; to change an existing one, edit it rather than adding a second.
-
Switch the reply on. Auto-reply is Whether senders get an automatic response at all — Automatically reply to incoming emails. The badge in the card header follows the switch between Active and Inactive as you set it. You can save with it off, which keeps the wording ready for next time.
-
Set a date range, if you want one. Date range is optional — Optionally limit the auto-reply to a specific period. Start date is Leave empty for no start limit. and End date is Leave empty for no end limit. Replies stop after this day (UTC). Both are whole days, compared in UTC, and with neither set the reply simply runs while it is switched on.
-
Write the reply. Subject is the Subject line of the auto-reply. and Message body is Plain text message content. A new reply arrives with both already filled in — subject Out of Office and a short "currently out of the office" message — so you can adjust the wording rather than start from nothing.
-
Add a formatted version, if you want one. Send a formatted (HTML) version reveals an HTML body: Add a rich, formatted version with links and styling. Recipients whose mail client can't display it fall back to the plain text above. Switching it back off clears the formatted version rather than merely hiding it — which is what you want, since a leftover HTML body is the version most clients would keep showing.
-
Save. Save changes returns to the list and confirms whether the reply went live or was saved while off.
The list then shows a row per mailbox with a reply configured: Mailbox, Date range — the dates, or No dates set — and Status, either Active or Disabled. Use the row's ⋮ menu to Edit it later.
Where the reply sits relative to your rules
The reply and the mailbox's rules are two parts of the same filter, and the reply goes first. The rules page says so where a reply exists: An out-of-office reply is set up for this mailbox, with an On/Off badge, an Edit reply link, and the note It runs before these rules, in the same script — a rule above it can't suppress it. So a rule that files or deletes a message does not stop the sender being answered.
A reply set up in webmail shows up on these screens too, and editing it here takes it over.
Remove an Out of Office reply
Open the row's ⋮ menu on the Out of Office list and choose Delete. The confirmation is headed Remove out-of-office for {address}? and warns that This cannot be undone. — the wording is gone, not just switched off. The mailbox's filter rules are untouched, and its row leaves the list.
If you only want the reply to pause, switch Auto-reply off on the form instead. The reply is kept, the row stays with a Disabled badge, and turning it back on is one switch.
When a mailbox has a custom filter script
A mailbox's rules are one filter script, and it can also be written elsewhere — by hand, or by another mail client. When that happens the rules page says so, headed This mailbox has a custom filter script, and explains that the script isn't one this rule builder wrote and is left exactly as it is, so nothing here can break it.
While a mailbox is in that state:
- The rules it describes are listed read-only, and the row menu says Read-only while the script is custom. New Rule is not offered.
- Show the script reveals the script itself, if you want to see what is running.
- Saving an out-of-office reply for that mailbox is refused too. The Out of Office form shows the same warning with a Go to Mail Rules button.
- Manage it here instead hands the mailbox over to the rule builder. It asks first — Replace the custom script? — and is explicit about the cost: the script is rewritten from the rules shown, and Anything in it this builder can't show — custom Sieve, extra conditions — is lost. Only you can trigger it; saving a rule never does it as a side effect.
A single rule can be beyond the form without the whole script being custom — one written in another client using options the builder doesn't offer. It carries the badge Uses options this form can't edit, and the form is closed to it: you can still turn it off, reorder it, or delete it, since none of those change what it matches.
Next steps
- Give one mailbox a first rule — newsletters into a folder is the easy one — and watch the numbered order as you add the second.
- Check Mail logs after a rule goes live, to confirm what it caught.
- Use an alias or a group rather than a forwarding rule when mail should reach several people — that's what they're for, and they don't depend on one mailbox's rules.
- Set up an out-of-office reply before the person leaves, with a date range, so it starts and stops on its own.
- Point people at webmail or their mail client for the folders their rules now file into.