LibraCyber ESG offers an additional content filtering check, that takes place before the message is sent to the security engine. Content filtering is useful to add very powerful and lightweight checks, matched against email body or headers, which will interfere with the normal flow of the email. A case when this feature is useful is when you want to redirect a message to another user on-the-fly.
In the table are displayed all the Content Filtering Rules available. You can filter out the rules by performing a Search. To delete one or more rules you can select them and click the Delete button in the table toolbar.
Creating a new rule
A content filtering rule is composed of two main parts: a Filter and an Action. To create a Content Filtering rule you can click on the New button on the table toolbar. Once you clicked the button, the below dialog appears.
Note: a new rule is Enabled by default, with the action Delete (Black hole). Check Action and Status before you save it.
Filters
The Filter is the condition for which the Action must be performed.
You can filter messages by Expression, ESG will try the given Value (a word, phrase or regex) to specified message header(s) (when Type is Apply to Headers) or to the message body (if Type is Apply to Body).
You can create more filters that ESG runs in the given Sequence. This is an order, so a rule having a greater value will be executed after an other rule having a smaller value.
Note: since content checks are executed before the security engine, the email body is processed as-in in the received email; this means, for example, that if the body is in a quoted-printable format the specified value should also be in quoted-printable format.
Actions
An Action is then executed when a Filter is matched. Available Actions are:
- Delete (Black hole): this action deletes the incoming message. The sender gets no error; in Search the message is listed among the SMTP Rejects as Content Filter drop.
- Redirect to relay
- Redirect to User: will silently rewrite the destination address and the original recipient will not receive the email.
- SMTP Reject
- Add Custom Header
- BCC to user
- Replace Text
Warning: after editing the table, select Apply pending changes in the top bar to make the changes effective.
Examples
| To | Type and headers | Filter Expression and Value | Action and Action Details |
|---|---|---|---|
| Refuse messages that declare a character set you never receive, for example a Cyrillic one | Apply to Headers · Content-Type;Subject
|
Matches any word in: koi8-r windows-1251
|
SMTP Reject |
| Send a copy of the messages addressed to one mailbox to another one | Apply to Headers · To
|
Contains: name@example.it
|
BCC to User · the address that receives the copy |
| Mark the messages of an internal system, so that mail rules can sort them | Apply to Headers · From
|
Contains: alerts@example.it
|
Add Custom Header · X-Source: monitoring
|
Character sets. A message declares its character set in the Content-Type header, for the whole message and for each of its parts (charset=…), and in an encoded subject (=?koi8-r?…). The first rule checks both. Common character sets: Cyrillic koi8-r, windows-1251, iso-8859-5; Arabic windows-1256, iso-8859-6; Chinese gb2312, gbk, big5; Japanese iso-2022-jp, shift_jis; Korean euc-kr.
With SMTP Reject the sending server receives a permanent error with the text Content-Filtered: followed by your Action Details (default: Rejected due to spam content).