Cleanbox
Features Helpdesk Blog Pricing Contact
Sign in Start free trial

Creating your first filter rule

Filters are rules that automatically take action on incoming emails based on conditions you define. Instead of manually sorting, blocking, or forwarding messages, you set up a filter once and Cleanbox handles it for every future email that matches.

When to use filters

Filters are useful whenever you want to automate a recurring action:

  • Block all emails from a specific domain
  • Allow emails from a sender that keeps getting quarantined
  • Forward matching emails to a specific IMAP folder
  • Automatically mark certain messages as read or flagged

Creating your first filter

  1. Navigate to Filters in the sidebar
  2. Click "Add filter"
  3. Give your filter a name (e.g., "Block marketing from example.com")
  4. Add one or more conditions
  5. Choose an action and optional options
  6. Click "Save"

Conditions

Conditions define which emails the filter applies to. Each condition has three parts: a component (field), an operator, and a value.

Available components

Component What it checks Example
fromThe sender email addressends_with "@spam.com"
from_nameThe sender display namecontains "Marketing"
senderThe Sender header (if different from From)contains "bulk"
subjectThe email subject linecontains "invoice"
bodyThe email body textcontains "unsubscribe"
headerRaw email headerscontains "X-Mailer: PHPMailer"
propertyMessage properties (multipart, has attachments, etc.)is "has_attachments"
categoryContact category (Shopping, Social Networks, etc.)equals "Shopping"
spam_scoreNumerical spam scoregreater_than 5
spam_symbolSpecific spam detection rules that triggeredcontains "DKIM_FAIL"

Operators

Operator Description
contains / not_containsField includes (or doesn't include) the value
equals / not_equalsField matches (or doesn't match) exactly
starts_with / ends_withField begins or ends with the value
matchesRegex pattern matching
exists / not_existsHeader or property is present (or absent)
is / is_notProperty check (boolean)
greater_than / less_thanNumerical comparison (for spam_score)

Actions

Each filter has a primary action and optional additional options:

Primary action

Action What it does
Allow Deliver the message, bypassing further filter evaluation and spam checks.
Deny Reject the message. It is not delivered to your inbox.
Note: For relay-protected addresses, the only available action is deny. Relay filters are specifically designed to block unwanted mail.

Additional options

When the action is allow, you can add these options to control how the message is delivered:

Option What it does
Store in folderDeliver to a specific IMAP folder instead of the default
Mark as readAutomatically mark the message as read upon delivery
Mark as flaggedFlag the message as important upon delivery
Forward toForward a copy of the message to another email address

Example: Deny all emails from a domain

  1. Click "Add filter"
  2. Name: Block spam-company.com
  3. Condition: from ends_with @spam-company.com
  4. Action: Deny
  5. Save

Example: Move invoices to a folder

  1. Click "Add filter"
  2. Name: Invoices to folder
  3. Condition: subject contains invoice
  4. Action: Allow
  5. Option: Store in folder → Invoices
  6. Save

Filter limits per plan

Plan Filters
Free3
Personal10
Premium / Advanced / EnterpriseUnlimited