Filtering messages on the server

NOTE

New in Kerio Connect 9!

Users can filter messages in their mailbox with Kerio Connect Client filters. Administrators can apply message filters directly on the Kerio Connect server.

For example, you can:

  • Forward messages sent to a former employee to another mailbox
  • Send an auto-reply to messages sent to a particular email address or even a domain
  • Add recipients to specific messages
  • Reject messages with large attachments

How message filters work

Kerio Connect applies Incoming rules (previously Receiving rules) to all recipients in the message. In the Outgoing rules (previously Sending rules), messages are considered separately for each recipient.

Here is an example of a message sent to multiple recipients. You can see the order how Kerio Connect processes the rules:

You can find specific examples below.

Creating incoming rules

Kerio Connect applies incoming rules to all messages that come to the server from local or remote senders.

These rules are applied before the outgoing rules and before the user filters in Kerio Connect Client.

  1. In the administration interface, go to Configuration > Content Filter > Message Filters.
  2. In the Incoming rules section, click Add.
  3. In the description field, type a name for the filter.
  4. Specify the conditions for the filter. To specify multiple email addresses, use a comma (,), or a semi-colon (;). Regular expressions and the ? / * placeholders are not supported.

  1. Specify the actions.

NOTE

You can use placeholders for headers values — ${size} for message size, ${subject} for message subject, and so on.

  1. (Optional) Select the Stop any other rules option. The rules are processed from the top. If the message matches the rule, no other rules are processed.
  2. Click OK.
  3. Click Apply.

Creating outgoing rules

Kerio Connect applies outgoing rules to all messages that Kerio Connect sends to local or remote recipients.

These rules are applied after the incoming rules and before the user filters in Kerio Connect Client.

  1. In the administration interface, go to Configuration > Content Filter > Message Filters.
  2. In the Outgoing rules section, click Add.
  3. In the description field, type a name for the filter.
  4. Specify the conditions for the filter. To specify multiple email addresses, use a comma (,), or a semi-colon (;). Regular expressions and the ? / * placeholders are not supported.

  1. Specify the actions.

NOTE

You can use placeholders for headers values — ${size} for message size, ${subject} for message subject, and so on.

  1. (Optional) Select the Stop any other rules option. The rules are processed from the top. If the message matches the rule, no other rules are processed.
  2. Click OK.
  3. Click Apply.

Example 1 - Forwarding messages to public folders

To forward messages to public folders, you must create:

  • An alias email address for the public folder
  • Server rule for forwarding the messages

You want all messages sent to accounting@company.com that include invoices as attachments to be sent to a public folder Invoices.

  1. In the Accounts > Aliases section, create an alias that points to a public folder.

  1. Go to the Configuration > Content Filter > Message Filters section.
  2. In the Incoming rules section, click Add.
  3. Set the condition to Recipient > Equals > accounting@company.com.
  4. Click the plus sign to add another condition.
  5. Set the condition to Subject > Contains > invoice.
  6. Click the plus sign to add another condition.
  7. Set the condition to Has an attachment.
  8. Set the action to Redirect to address and type the alias email address of the public folder.

NOTE

If you use Add recipient or Copy to address, Kerio Connect delivers the message to other recipients as well.

  1. Click OK and Apply.

NOTE

If you use Redirect to address, the message is not delivered to the original recipients, however, the sender receives their delivery receipt if required.

Example 2 - Prohibiting sending messages to remote recipients for individual users

In the settings of each user, you can disable the user to send and receive messages outside their own domain.

With a special server rule you can limit this either to sending or receiving.

You want to disable John Smith (jsmith@company.com) to send messages outside his domain (company.com). However, he can receive messages from other domains.

  1. Verify that the This user can send/receive messages... option in the user settings is disabled.
  2. Go to the Configuration > Content Filter > Message Filters section.
  3. In the Outgoing rules section, click Add.
  4. Set the condition to Sender > Equals > jsmith@company.com.
  5. Click the plus sign to add another condition.
  6. Set the condition to Recipient > Does not contain > company.com.
  7. Set the action to Reject message and type the reason for rejecting that the user receives.
  8. Select Stop any other rules.
  9. Click OK and Apply.

NOTE

If the message has multiple recipients and some of them are from the user's domain, Kerio Connect delivers the message to the recipients from the user's domain and rejects to deliver to message to recipients outside the user's domain.

If you create the same rule in the Incoming rules section, neither remote nor local recipients get the message.

Example 3 - Sending a copy of a message to another email address

A team of support technicians help customers solve their problems. They communicate via their email addresses:

  • asmith@company.com
  • berd@company.com
  • cbrown@company.com

They also have a team address support@company.com.

You want to send a copy of all messages, which they send, to their team address so that the other team members are aware of the current issues

  1. In the Incoming rules section, click Add.
  2. Set the condition to From > Contains > asmith,berd,cbrown
  3. Set the action to Add recipient > support@company.com
  4. Click OK and Apply.

NOTE

You can also use Copy to address. Both Add recipient and Copy to address send a blind copy to the specified address. However, if the message cannot be delivered to that address, the sender gets notification only if you use Add recipient.

Example 4 - Rejecting messages with large attachments

You want to prevent your Kerio Connect to be overloaded with large attachments.

You can limit the size of messages with attachments that go through your server:

  1. In the Incoming rules section, click Add.

NOTE

If you create this rule in Outgoing rules, the Kerio Connect server may get overloaded if the message has many recipients.

  1. Select All in the drop-down list.
  2. Set the condition to Has an attachment.
  3. Click the plus sign to add another condition.
  4. Set the condition to Message size > Over > 100MB.
  5. Set the action to Reject message and type the reason for rejecting that the sender receives.

NOTE

If you select Discard message, the sender is not notified.

  1. Select Stop any other rules.
  2. Click OK and Apply.

To limit large attachments only for specific users, create this rule in the Outgoing rules section and specify recipients.

Examples 5 - Sending an auto-reply message

You want to send an automatic reply to each message that Kerio Connect delivers to your support team address.

  1. In the Incoming rules section, click Add.
  2. Set the condition to Recipient > Equals > support@company.com.
  3. Set the action to Auto-reply and type the text.
  4. Click OK and Apply.