1 (edited by Chrissicom 2017-10-16 04:37:17)

Topic: Amavisd/SpamAssassin not blocking e-mail

I am running iRedMail 0.9.7 on CentOS 7 64-bit.

amavisd is adding the ***SPAM*** headers when the $sa_tag2_level_deflt is reached, which is 5.0 in my case. Every mail with a X-Spam-Score equal or above 5.0 in the header is tagged  with ***SPAM*** as expected.

$sa_kill_level_deflt is set to 7.9 in my case and $final_spam_destiny is set to  D_DISCARD. That means that e-mails with a X-Spam-Score equal or above 7.9 should not be delivered.

However I got several e-mails with a higher X-Spam-Score. One example:

X-Spam-Flag: YES
X-Spam-Score: 10.912
X-Spam-Level: **********
X-Spam-Status: Yes, score=10.912 tagged_above=-999 required=5
    tests=[HTML_MESSAGE=0.001, RDNS_NONE=6, T_REMOTE_IMAGE=0.01,
    URIBL_ABUSE_SURBL=4.9, URIBL_BLOCKED=0.001]

This should not be delivered with the above settings. Any ideas?

----

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

2

Re: Amavisd/SpamAssassin not blocking e-mail

Chrissicom wrote:

$final_spam_destiny is set to  D_DISCARD.

Do you have duplicate setting ($final_spam_destiny) in amavisd config file?

iRedMail-0.9.7 uses spam policy stored in SQL db, please check sql table "amavisd.policy", global policy has column "policy_name=@.".

3 (edited by Chrissicom 2017-10-17 06:24:44)

Re: Amavisd/SpamAssassin not blocking e-mail

ZhangHuangbin wrote:
Chrissicom wrote:

$final_spam_destiny is set to  D_DISCARD.

Do you have duplicate setting ($final_spam_destiny) in amavisd config file?

iRedMail-0.9.7 uses spam policy stored in SQL db, please check sql table "amavisd.policy", global policy has column "policy_name=@.".

Hi, the setting

$final_spam_destiny = D_DISCARD

can be found in the default amavisd.conf that comes with iRedMail.

I do find amavisd.policy however there is only one tuple in that table with practically everything set to null except for a few exceptions. There is no "final_spam_destiny" in that tuple but e.g. "spam_tag_level" which is null but sounds similar to sa_tag_level to be found in amavisd.conf

Maybe "spam_lover" must be N ? ... and not Y (which is the default in amavisd.policy after installing iRedMail since I didn't change anything in that table)

4

Re: Amavisd/SpamAssassin not blocking e-mail

Default policy set by iRedMail is:

INSERT INTO policy (policy_name,
                    spam_lover, virus_lover, banned_files_lover, bad_header_lover,
                    bypass_spam_checks, bypass_virus_checks, bypass_banned_checks, bypass_header_checks,
                    spam_quarantine_to, virus_quarantine_to, banned_quarantine_to, bad_header_quarantine_to)
            VALUES ('@.',
                    'Y', 'N', 'Y', 'Y',
                    'N', 'N', 'N', 'N',
                    '', 'virus-quarantine', '', '');

INSERT INTO users (priority, email) VALUES (0, '@.');

UPDATE users SET policy_id = (SELECT id FROM policy WHERE policy.policy_name='@.' LIMIT 1);

Amavisd will query SQL and get the spam policy, then override the ones set in amavisd.conf.

5

Re: Amavisd/SpamAssassin not blocking e-mail

To block detected spams, please set "spam_lover=N". If you need to quarantine them to SQL db, also set "spam_quarantine_to=spam-quarantine".

6

Re: Amavisd/SpamAssassin not blocking e-mail

ZhangHuangbin wrote:

To block detected spams, please set "spam_lover=N". If you need to quarantine them to SQL db, also set "spam_quarantine_to=spam-quarantine".

Thanks. Changing the setting in combination with my adjusted SpamAssassin scores reduced SPAM that is getting through to 0 :-)