A Block Attachments rule stops emails that carry attachments and tells the sender why. The recipient gets nothing. Use it to enforce a data policy, for example "no attachments to personal webmail domains" or "no executable files from outside". This page covers the rule wizard, the sender notice, filters, and what to check when a rule blocks too much or too little.
Warning: A blocked email is not delivered, not held and not stored anywhere by mxHERO. The sender must send it again. Test every Block Attachments rule with a pilot sender before you widen it.
Before you begin
- Your mail is routed through mxHERO for the direction you want to control. See Routing Architectures.
- The senders or recipients you want to target are managed accounts in Settings › Accounts and Groups (or covered by Organization). At least one side of the rule must be managed. See Senders and Recipients.
- Decide which attachments to block. Without filters, the rule blocks every email that has an attachment.
- Optional: a filter policy in Auto Filling › Filter Policies, for example one built on the default variable Common threat vector Extension. See Filter Policies.
How it works
- A message matches the rule's senders and recipients.
- mxHERO checks the message's attachments against the rule's Action Filters. If no attachment qualifies, the rule doesn't apply and the message continues.
- If at least one attachment qualifies, mxHERO drops the whole message for that recipient. The other attachments and the body are not delivered either.
- mxHERO sends the sender a notice from
noreply@mxhero.com, as a reply to the original message.
Block Attachments checks each recipient separately. If an email goes to one internal and one external recipient and the rule targets Organization to Anyone else, only the external copy is blocked. The internal recipient still gets the email.
Block Attachments rules run before Temporary Hold, Request Approval, Copy Emails and the storage actions. Once a message is blocked for a recipient, no later rule runs on that copy. See How Rules Work.
| Supported target | Notes |
|---|---|
| Email Flow | The only target. Between and From are both allowed. |
| User Mailboxes, Forwarding Address | Not available. |
There are no Cloud Storage or Storage Filepath steps and no More actions... panel.
Create a Block Attachments rule
Step 1: Action
Open Rules › Create a Rule.
-
Click Block Attachments, then Start Rule Creation.
The Action step reads "All your attachments will be blocked". This text describes the action; the filters you add next decide which attachments count.
Optionally open Advanced Options and edit Block notification settings (see Sender notice).
Click Confirm.
Add Filters: choose which attachments block the email
- Under the Action step, click Add Filters. The Action Filters panel opens.
- Turn on the filters you need:
| Filter | Effect for Block Attachments |
|---|---|
| Include attachments by size (minimum) | Only attachments bigger than this size count. Enter a number and choose Bytes, Kilobytes or Megabytes. |
| Include attachments by extension / Exclude attachments by extension | Only these extensions count, or these extensions never count. Type an extension and press Enter. Case doesn't matter. |
| Include attachments by name matching / Exclude attachments by name matching | Same, by file name. |
| Include attachments by type / Exclude attachments by type | Same, by Image, Audio, Text, Video or Application. |
| Exclude inline images | Images embedded in the body (logos, signatures) don't count. |
| Only process protected ZIP files | Only password-protected .zip attachments count. The other attachment filters are turned off. Use this to block encrypted archives that can't be scanned. |
| Include RFC822 Emails | Emails attached to the email count as attachments. |
| Exclude mail system administrative messages | Delivery reports (multipart/report) never match. |
| Use filter policy | The rule applies only when the selected filter policy matches. |
| Include TNEF messages | Messages packaged as winmail.dat (TNEF) match as a whole. mxHERO can't see the attachments inside them. |
- Check the state of every toggle before you continue.
If you don't add Action Filters, mxHERO uses built-in defaults: inline images don't count, attached emails do, and every other attachment blocks the message.
Important: TNEF messages from Outlook and Exchange (
winmail.dat) are skipped unless Include TNEF messages is on. With it on, every TNEF message matches, whatever is inside it. Prefer turning TNEF off at the source. See Preventing TNEF Encapsulation.
For how filters, filter policies and exclusions combine, see Filters and Exclusions.
Step 2: Target
Under Rule Scope:, Email Flow is the only choice.
-
Under Target all emails sent:, choose Between (both directions) or From (one direction), then the Sender and Recipient. Defaults: Organization and Anyone.
Typical choices:
Goal Sender Recipient Stop attachments leaving the company Organization Anyone else Stop attachments to a specific domain Organization webmail.exampleStop risky attachments arriving Anyone else Organization -
Optionally open Advanced Options:
- Include From, To and CC when evaluating which emails will be processed. Match header addresses as well as the envelope.
- Include From header when evaluating which emails will be processed. Add the From header to the sender side.
Both are off by default and can't be on together.
Click Confirm.
Add Filters: Target Filters (optional)
Click Add Filters under the Target step to add:
- Use filter policy: the rule runs only when the filter policy matches.
- Process only managed accounts: the sender or the recipient must be an account in Settings › Accounts and Groups.
-
Sender/Recipient (From/To) Exclusions: pairs of addresses the rule skips, for example
ceo@example.comto Anyone.
#nomxhero in the subject does not cancel a Block Attachments rule.
Name and save
- In the right column, enter a Rule Name and, optionally, a Rule Description.
- Optionally set Locale (the language of the default notice) and TimeZone.
- Click Save Rule.
New rules are enabled when saved. Changes take one to two minutes to apply.
Sender notice
The sender gets one notice for the blocked recipient. Edit it in the Action step under Advanced Options › Block notification settings.
| Field | Default | Limit |
|---|---|---|
| Notification subject | Email blocked |
115 characters |
| Notification body content | "Your email has been blocked due to an organization data policy. Emails with attachments from $SENDER_ADDRESS to $RECIPIENT_ADDRESS are not allowed. Please re-send your message following the security guidelines." | 1,500 characters |
Variables in these fields use a $ and capitals, not braces:
| Variable | Replaced with |
|---|---|
$SENDER_ADDRESS |
The From address of the blocked email (the envelope sender if there is no From) |
$RECIPIENT_ADDRESS |
The recipient the email was blocked for |
Tell senders what to do next in the body, for example "Share the file through your company Box folder instead." For all other notification texts, see Notification Templates.
The message is dropped even if the notice can't be sent.
Verify
- From a pilot sender, send an email with an attachment that should be blocked to a test recipient.
- Check that the recipient gets nothing and the sender gets the notice.
- Open Reports › Email Flow Logs and find the message. Its status is Dropped by rule action, and the event list shows your rule. See Email Flow Logs.
- Send an email that should not be blocked (no attachment, or an allowed type) and check it's delivered.
Limits and failure behavior
- Email Flow target only. Block Attachments can't act on mail already in mailboxes.
- The whole message is blocked for the recipient, not only the matching attachment. To remove only some attachments and deliver the rest, use Protect Attachments instead.
- Unlike other actions, Block Attachments doesn't fail open: if the rule matches, the message is dropped even if sending the notice fails.
- If mxHERO can't load rules at all, mail is delivered without rules (including Block). See How Rules Work.
- Blocked messages can't be released or recovered from mxHERO.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Every email with a logo or signature image is blocked | Inline images count as attachments in your filter settings | Turn on Exclude inline images in Action Filters. |
| Emails with forbidden attachments get through | The attachment didn't match the filters, the message is TNEF (winmail.dat), or the flow didn't match |
Open the message in Email Flow Logs and read the skip reason (for example mail_content_without_attachments, mail_content_is_tnef, flow_filter_from_to). Adjust filters, or turn on Include TNEF messages. |
| All TNEF messages are blocked | Include TNEF messages is on, so any TNEF message matches as a whole | Turn TNEF off in Exchange, or turn the option off. |
| The rule doesn't run at all | Neither sender nor recipient is managed, the rule is disabled, or it was saved less than two minutes ago | Check the rule in the Rules List and the sender/recipient choice. |
| Senders don't understand the notice | The default text is generic | Edit Notification body content to explain the policy and the alternative. |
The notice shows $SENDER_ADDRESS literally |
The variable is misspelled or written with braces | Use $SENDER_ADDRESS and $RECIPIENT_ADDRESS exactly. |
Comments
0 comments
Please sign in to leave a comment.