Email filters
An email filter sorts and redirects incoming emails according to certain criteria that you specify to determine how to handle email messages.
The system uses the mail server Dovecot and the plugin Sieve. You can install them in Settings → Features. Learn more in Install a mail server.
Step 1. Create an email filter
- Go to Domains → Mail domains → Filter settings → Add.
- Enter the Email filter name.
- In the Place before field select a condition.
- To set an action that will be applied to all emails:
- In the Operator field select "Without rules".
- Click on Next and go to Step 3.
- To set the conditions when the filter will be applied:
- In the Operator field select: "All are true" — the filter will be applied if all conditions are met; "At least one is true" — the filter will be applied if at least one condition is met.
- Click on Next and go to Step 2.
Step 2. Filter rules
Select Rule 1 and add parameters. Set other rules and click on Next.
"Sender", "sender or recipient", "recipient", "message body", "message header"
- Select an Operator to check the parameter:
- equals — the email exactly matches a defined value;
- contains — the email parameter contains a text that you defined in Value;
- matches regex — the email parameter matches a regular expression that you define in Value.
- Enter one or several Values that will be compared with the email parameter.
- Check the Not box to enable the converse condition.
"Size"
- Select an Operator to check the parameter: "greater" or "less".
- Enter the email Size (Kb).
"Message header"
- Enter the message header in the Parameter value field. You can enter several values space separated.
- Select an Operator to check the parameter:
- equals — the email exactly matches a defined value;
- contains — the email parameter contains a text that you defined in Value;
- matches regex — the email parameter matches a regular expression that you define in Value.
- Enter one or several Values that will be compared with the email parameter.
- Check the Not box to enable the converse condition.
Step 3. Filter actions
When an email matches your filter, the control panel will apply one of the actions that you specify:
Select Action 1 and enter its parameters. Add as many actions as you need and click on Finish.
"Save copy"
In Action 2 select where you want to save the email copy:
- forward — the email copy will be redirected to the mailbox specified in the Value field;
- save to folder — the email will be saved in the specified Directory. Select "New directory" to create a new one and enter its Name.
"delete"
The email will be deleted.
"deny"
The email will be rejected. Enter a response to the email sender in the Value field.
"forward"
The email copy will be sent to the specified mailbox. Enter the recipient email address in the Value field.
"save to folder"
The ticket will be saved to the specified Directory. Or you can create a "New directory" and enter the New directory name.