1

Topic: Passed SPAM and still delivered.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? easy
- Linux/BSD distribution name and version: debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Dear iRedMail users,

i got a question about the "Passed SPAM" issue.

Everytime i get a "Passed SPAM" situation it looks like it is getting delivered / forwarded to the mailbox. Is there anyway to remove the e-mail when it has a "Passed SPAM".

Log of a passed spam situation:
Jun 17 23:56:37 mail amavis[14847]: (14847-11) Passed SPAM {RelayedTaggedInbound}, [124.113.218.58]:3739 [124.113.218.58] <ayowciedi@amcham.no> -> <info@existingdomain.com>, Queue-ID: 45SQ5v5nmTz274C, Message-ID: <15007111.13502828.1560808621550@acro.pk>, mail_id: GIPQCRznnmBo, Hits: 6.057, size: 1676, queued_as: 45SQ5x1vSBz2Cqr, 940 ms, Tests: [DEAR_SOMETHING=1.731,FREEMAIL_FORGED_FROMDOMAIN=0.25,FREEMAIL_FROM=0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.25,HTML_MESSAGE=0.001,HTML_MIME_NO_HTML_TAG=0.635,MIME_HTML_ONLY=0.1,RDNS_NONE=1.274,SPF_FAIL=0.919,SPF_HELO_SOFTFAIL=0.896]
Jun 17 23:56:37 mail postfix/amavis/smtp[21534]: 45SQ5v5nmTz274C: to=<info@existiondomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=2, delays=1/0.03/0/0.95, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 45SQ5x1vSBz2Cqr)
Jun 17 23:56:37 mail postfix/pipe[21538]: 45SQ5x1vSBz2Cqr: to=<info@existingdomain.com>, relay=dovecot, delay=0.08, delays=0.01/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)

The amavis configuration part is:

# SPAM.
$final_spam_destiny = D_DISCARD;
$spam_quarantine_method = 'sql:';
$spam_quarantine_to = 'spam-quarantine';

I should assume that if there is spam "Passed SPAM situation" than the e-mail will be discarded. But when i read "status=sent delivered via docecot service". i dont get the impression that this is the case.

Please could somebody help me out to configure that the e-mail is getting removed when it hits "Passed SPAM".

----

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

2

Re: Passed SPAM and still delivered.

An extension to my first post.

Is it possible to that the sending e-mail is not beining informed when spam is detected. Lets say: no bounce, just remove the mail.

3

Re: Passed SPAM and still delivered.

tedsje wrote:

I should assume that if there is spam "Passed SPAM situation" than the e-mail will be discarded. But when i read "status=sent delivered via docecot service". i dont get the impression that this is the case.

Amavisd is configured to query SQL db to get the spam policy settings. For global setting, please update the SQL record in "amavisd.policy" table, with column "policy_name='@.'":

USE amavisd;
SELECT * FROM policy WHERE policy_name='@.' \G

Spam is configured to bypass and not quarantined. if you want to quarantine it, please update "amavisd.policy" table with command below:

UPDATE policy SET spam_lover='N',bypass_spam_checks='N',spam_quarantine_to='spam-quarantine' WHERE policy_name='@.';

4

Re: Passed SPAM and still delivered.

tedsje wrote:

Is it possible to that the sending e-mail is not beining informed when spam is detected. Lets say: no bounce, just remove the mail.

In /etc/amavis/conf.d/50-user, find "spam_admin_maps" and set its value to empty list. For example:

$policy_bank{'ORIGINATING'} = {
    ...
    spam_admin_maps  => [],
    ...
};

5

Re: Passed SPAM and still delivered.

Hello ZhangHuangBin,

Thank for your reply.

For the understanding. When i update the polcy table. The server will discard the spam mails.

When i change the "spam_admin_maps" in the amavis 50-user file. The users for which the mails indendid wil not be notified?

Also if this is working. You gonna get another coffee! I am always happy with your fast and conrete response.

6

Re: Passed SPAM and still delivered.

tedsje wrote:

When i update the polcy table. The server will discard the spam mails.

Yes.

tedsje wrote:

When i change the "spam_admin_maps" in the amavis 50-user file. The users for which the mails indendid wil not be notified?

Wait a sec, "spam_admin_maps" is a list of system admins, not sender.
Amavisd doesn't notify spam sender.

7

Re: Passed SPAM and still delivered.

Alright, then i am only going to change the policy in the sql table.

Thanks for the update and please take my coffee!

8

Re: Passed SPAM and still delivered.

tedsje wrote:

Thanks for the update and please take my coffee!

Thank you very much. smile