Help & How-to

Sieve server side filter


Our email system supports Sieve e-mail filtering. You can apply filters for incoming e-mail messages as though they are delivered to a specific directory in your emalbox.
If you like to structure emails based on the sender/to/cc/subject into dedicated folders then you can create Sieve Filters for that purpose.
The Sieve scripts can be generated by a GUI-based rules editor using squirrelmail,

You need to click on the "Filters" link then "Add a new rule" .

 

 


Filter #1 - Spamassassin
When an emailbox uses Sieve Filter the spam is not moved in the Junk folder automatically.
To identify spam from Spamassassin you need to add the following rule

["Header"] ["X-Spam_score"] ["Matches wildcar"] ["*"]

The header "X-Spam_score"  will be added only when the "spam score" is above the spam-threshold (https://www.servermx.com/en/help/howto/antispam.html)

 


Filter #2 - ClamAV antivirus
Incoming emails are checked against virus with ClamAV. ClamAV is a tool-kit able to detect many types of malicious software, including viruses.
When an email contains a virus, ClamAV indentifies the email as spam and, when the score is higher to the pre-set value (see Antispam), it is added the following header:

"X-Spam-Virus: yes"
In order to indentify spam you can use this value in your custom Sieve filter.

 


Filter #3 - Identifying emails with attachment

when an email has an attachment, the header "X-Attach" is added . For example the following rule identifies email with attachments.

["Header"] ["X-Attach"] [contains] [yes]

 


Filter #4 - How to block spam at "server" level

It is possible to block spam at "server-side" without emails hit your email box. The following rule performs this action

["Header"] ["X-Spam_bar"] [contains] [+++++++++++++++++++++++++]

The number of "+" is in funtion of the spam-score the email needs to have to trigger the rule. 

For example:

X-Spam_score: 31.3
X-Spam_score_int: 313
X-Spam_bar: +++++++++++++++++++++++++++++++


Filter #5 - Moving incoming emails to a dedicated folder

You can apply filters for incoming e-mail messages as though they are delivered to a specific directory in your emalbox.

 

Our contacts