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.
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:
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.