1

Topic: Discard spam directly not working

EE v 1.4.0
Ubuntu
MariaDB

When I set a user to "Discard spam directly" they continue to receive the periodic email about their quarantine and it is still collecting spam.

In looking at the original schema when a user is created:
github.com/iredmail/iRedMail/blob/master/samples/amavisd/default_spam_policy.sql

I noticed that all the *_quarantine_to fields are initialized to an empty string. But when the UI alters the settings for "Enable spam checking" the *_quarantine_to field is set to NULL. Is it possible that amavisd is expecting the empty string and seeing the NULL is causing the problem?

I have set some test accounts to the empty string in amavisd.policy table directly but will need to wait a day to see if that works.

----

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 directly not working

I have confirmed that going into the avamisd.policy table and changing NULL to '' (empty string) causes the daily quarantine emails to stop as desired. Just need to fix the UI so it does not insert the NULLs.

3

Re: Discard spam directly not working

Could you please show me output of command below?

grep 'final_spam_destiny' /etc/amavis/conf.d/50-user

4

Re: Discard spam directly not working

Hi @barasmith,

I cannot reproduce this issue. Could you please show me output of command below?

grep 'final_spam_destiny' /etc/amavis/conf.d/50-user

5

Re: Discard spam directly not working

ZhangHuangbin wrote:

Hi @barasmith,

I cannot reproduce this issue. Could you please show me output of command below?

grep 'final_spam_destiny' /etc/amavis/conf.d/50-user

Sorry, I must not have things configured to send me mail when someone updates a post.

root@mx:/var/log# grep 'final_spam_destiny' /etc/amavis/conf.d/50-user
$final_spam_destiny = D_DISCARD;

I have gotten around the problem for now by throwing together a python script that runs every 10 minutes and fixes the table.

cursor.execute("update policy set virus_quarantine_to='' where virus_quarantine_to is null")
cursor.execute("update policy set spam_quarantine_to='' where spam_quarantine_to is null")
cursor.execute("update policy set bad_header_quarantine_to='' where bad_header_quarantine_to is null")
cursor.execute("update policy set banned_quarantine_to='' where banned_quarantine_to is null")