1

Topic: discard spam over a certain score

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.7
- Linux/BSD distribution name and version:  - Ubuntu 14.04.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  - MySQL
- Web server (Apache or Nginx): - Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hi,

First - LOVE iRedMail.  Thanks so much!

Question - is there a way to discard spam based on score? 

Currently all spam is tagged in the subject and moved to the Junk folder.

I've written some rules in  /var/vmail/sieve/dovecot.sieve that will move to Junk based on the score, starting at 5.  Is there a way to discard spam scoring 12 or higher while maintaining "not moving" spam below 5 out of the inbox?

Thanks,

Dave

if header :is "X-Spam-Level" "\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

if header :is "X-Spam-Level" "\*\*\*\*\*\*\*\*\*\*\*"
{
    fileinto "Junk";
    stop;
}

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: discard spam over a certain score

You may want to update Amavisd settings instead, not sieve rules.

Amavisd config file on Debian/Ubuntu is /etc/amavis/conf.d/*, we add custom settings in '50-user'.

*) set '$final_spam_destiny = D_DISCARD;'
*) set '$sa_kill_level_deflt = 12;' (change 12 to whatever you want)
*) restart amavisd service.

3

Re: discard spam over a certain score

Thank you!  I'll give it a try tonight!