A rule tells mxHERO what to do with email: which messages to act on, what to do with them, and where to store the result. This page explains what a rule is made of, where rules run, how mxHERO decides whether a rule applies, and what happens when several rules match or when something fails. Read it before you build your first rule.
What a rule is made of
Every rule has one action and one target. Most rules also have conditions and a storage destination.
| Part | What it decides | Where you set it |
|---|---|---|
| Action | What mxHERO does, for example save attachments to storage and replace them with links | Step Action of the rule wizard |
| Target (Rule Scope) | Which mail the rule sees: mail in transit (Email Flow), mail already in mailboxes (User Mailboxes), mail sent to a special address (Forwarding Address), or files dropped in Box folders (Storage Webhook) | Step Target |
| Senders and recipients | For Email Flow rules, whose mail is included | Step Target |
| Filters and exclusions | Extra conditions: attachment types and sizes, filter policies, hashtags, excluded addresses | Add Filters panels |
| Cloud Storage and Storage Filepath | Which storage account and folder receive the files, and how links are secured | Steps Cloud Storage and Storage Filepath |
| More actions | What to do when processing fails or succeeds | Add Action panel |
| Rule Name, Locale & Time zone | How you identify the rule, and which language and time zone it uses | Right-hand column of the wizard |
See Create a Rule for the wizard.
Actions and the targets they support
Each action works only with certain targets.
| Action | What it does | Targets |
|---|---|---|
| Protect Attachments | Saves attachments to storage and replaces them with links | Email Flow, User Mailboxes |
| Drag and Drop | Files emails that users drop into monitored Box folders | Storage Webhook |
| Copy Emails | Saves a copy of emails or attachments; the original is not changed | Forwarding Address, Email Flow, User Mailboxes |
| Move Emails | Saves emails to storage, then moves the originals to trash or deletes them | User Mailboxes |
| Secure Emails | Replaces the message body and attachments with secure links | Email Flow |
| Block Attachments | Stops emails with attachments and notifies the sender | Email Flow |
| Request Approval | Holds emails until one or more reviewers approve them | Email Flow |
| Temporary Hold | Delays emails so the sender can release or discard them | Email Flow |
| Zip Attachments | Replaces attachments with a password-protected ZIP file | Email Flow |
| S/MIME Emails | Validates, signs, encrypts or decrypts emails with S/MIME certificates | Email Flow |
Each action has its own page in Rule Actions, for example Protect Attachments. Targets are described in Rule Targets.
Where rules run
- Email Flow rules run in the mxHERO gateway while a message is on its way, before it is delivered. Your mail system must route mail through mxHERO. See How mxHERO processes email.
-
Forwarding Address rules run when a message arrives at the rule's
@go.mail2cloud.ioaddress. The message is saved and is not delivered anywhere. - User Mailboxes rules connect to mailboxes and process mail that is already there, once or continuously. Mail routing does not need to change.
-
Storage Webhook (Drag and Drop) rules run when an
.emlor.msgfile is added to a monitored Box folder.
The rest of this page is about Email Flow rules unless it says otherwise.
How mxHERO decides whether an Email Flow rule applies
mxHERO splits each message into one copy per recipient and evaluates rules for each copy. So one message to three people can be handled differently for each recipient. For example, a rule for external recipients protects the attachments for the outside recipient, while the internal recipient gets the original.
For each rule and each recipient copy, mxHERO checks the conditions in this order. If any check fails, the rule is skipped for that copy and the next rule is checked.
Each rule's conditions are checked in a fixed order; the first condition that fails stops the rule for that recipient.
Details of each check are in Senders and Recipients and Filters and Exclusions.
Whose rules run
- The sender's organization's rules run first.
- If the recipient belongs to a different mxHERO organization, that organization's rules run next. Mail between two of your own users is evaluated once, by your organization.
- If Only process email rules with transport agent header (sometimes called Strict Mode) is on in Settings › Gateway, your rules run only on messages that carry your organization's Transport Agent value. See Gateway Settings.
Rules that run before the message is split
Temporary Hold and Request Approval rules can hold a message for all of its recipients at once. These rules run once per message, before mxHERO splits it per recipient (sometimes called the preprocessing phase). They run only for mail sent by your organization's own users. See Temporary Hold and Request Approval.
When several rules match
You can't set a priority between rules. mxHERO runs matching rules in a fixed order of action types:
- S/MIME Emails
- Block Attachments
- Temporary Hold
- Request Approval
- Copy Emails
- Zip Attachments
- Secure Emails
- Protect Attachments
Within the same action type, the rule with the more specific sender and recipient runs first, in this order: email address, tag, group, domain, Organization, Anyone else, Anyone. The sender side counts slightly more than the recipient side.
Two more rules apply:
- A rule that takes the message stops the rest of that pass. When a rule blocks the message, holds it, sends it to storage to replace its content (Protect Attachments, Secure Emails, Zip Attachments with storage), or applies S/MIME, the remaining rules in that pass are skipped. Copy Emails rules do not take the message, so several Copy Emails rules can all run, and a Protect Attachments rule can still run after them.
- Each rule runs at most once per message.
Important: Because the order is fixed, two rules with overlapping senders and recipients can interact in ways you don't expect. For example, a Block Attachments rule always runs before a Protect Attachments rule for the same mail. Test overlapping rules with a pilot user and check Reports › Email Flow Logs.
Rule locale and time zone
Each rule can have its own Locale and TimeZone (in the wizard, under Locale & Time zone). If you leave them empty, the rule uses the organization's settings.
- The time zone is used for date variables in folder and file names, for example
{Sent or Receive Date / yyyyMMdd}. A message sent at 23:30 UTC on the 1st is filed under the 2nd for a rule set to Asia/Tokyo. - The locale sets the language of the notifications the rule sends (English, French or Japanese).
When changes take effect
- New and changed Email Flow rules apply within about 1 to 2 minutes.
- Only enabled rules run. Stopping a rule in the Rules List takes effect within the same 1 to 2 minutes.
- Up to 1,000 enabled Email Flow rules per organization are loaded.
- User Mailboxes rules start within a few minutes of saving. Continuous ones check for new mail about every 5 minutes.
What happens when something fails
mxHERO is designed to fail open: if a rule can't do its job, the original message is still delivered.
| Situation | What the recipient gets |
|---|---|
| A rule doesn't match | The message, processed by any other rules that match |
| A rule fails with an error | The original message, unchanged. Later rules still run. The error appears in Reports › Email Flow Logs and Reports › Notifications. |
| Protect Attachments, Secure Emails or Zip Attachments can't save to storage | The original message with its attachments |
| Same, and the rule's More actions is set to Bounce email to sender | Nothing. The sender gets a [BOUNCED] notice and can resend. |
| Storage keeps failing with temporary errors until all retries are used up | The original message, even if Bounce email to sender is set |
| Block Attachments matches | Nothing. The message is always dropped, even if the sender's notification fails. |
| The message can't be read (malformed MIME) | The original message, without any rule processing |
Messages in winmail.dat (TNEF) format are skipped by Protect Attachments, Secure Emails, Zip Attachments and S/MIME Emails. See Preventing TNEF Encapsulation.
Comments
0 comments
Please sign in to leave a comment.