1

Topic: Incoming spam mails are not going to Junk folder

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 2020082501 (Backend: mariadb, Date: 2020-08-25 22:50:10) iRedMail Easy: https://www.iredmail.org/easy.html

- Deployed with iRedMail Easy or the downloadable installer?: Easy
- Linux/BSD distribution name and version: CentOS Linux release 8.2.2004
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mariadb
- 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.
====

Upon checking, the junk folder is always empty for all mailboxes. The incoming spam mails are not placed into the Junk folder. To this further, I sent a test mail with " GTUBE -- the Generic Test for Unsolicited Bulk Email." content. But the mail got discarded. This does not surprise me as this mail has a spam score of 1000.

How can I sure the junk folder is working?.

---
Dec  7 14:00:31 mail1 amavis[384029]: (384029-01) Blocked SPAM {DiscardedInbound,Quarantined}, [209.85.208.181]:45210 [209.85.208.181] ESMTP/ESMTP <SRS0=qIBS=FL=gmail.com=notrealuser@mail1.mydomain.com> -> <postmaster@mydomain.com>, (ESMTPS://[209.85.208.181]:45210), quarantine: LVMwmo9kI3cJ, Queue-ID: 4CqQ1n5QgtzGFMBn, Message-ID: <CADw6QsifUgTnTCFxz3izsyrG_=pXX9-cf69R3=zhrNBRK9nKag@mail.gmail.com>, mail_id: LVMwmo9kI3cJ, b: Yy3KL6ojJ, Hits: 1000.151, size: 3664, Subject: "Test spam mail (GTUBE)", From: <notrealuser@gmail.com> (dkim:AUTHOR), helo=mail-lj1-f181.google.com, Tests: [DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,FREEMAIL_FORGED_FROMDOMAIN=0.001,FREEMAIL_FROM=0.001,GTUBE=1000,HEADER_FROM_DIFFERENT_DOMAINS=0.249,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_NONE=-0.0001,RCVD_IN_MSPIKE_H2=-0.001], autolearn=no autolearn_force=no, autolearnscore=0.151, dkim_i=@gmail.com, dkim_sd=20161025:gmail.com, 1777 ms
Dec  7 14:00:31 mail1 amavis[384029]: (384029-01) Blocked SPAM, <SRS0=qIBS=FL=gmail.com=notrealuser@mail1.mydomain.com> -> , Hits: 1000.151, tag=2, tag2=6.2, kill=6.9, L/Y/Y/Y
Dec  7 14:00:31 mail1 postfix/amavis/smtp[384059]: 4CqQ1n5QgtzGFMBn: to=<postmaster@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=0.3/0.06/0.01/1.8, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=384029-01 - spam)
Dec  7 14:00:31 mail1 postfix/qmgr[1231446]: 4CqQ1n5QgtzGFMBn: removed
--

Amavis settings

$sa_tag_level_deflt  = 2.0;  # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 6.2;  # add 'spam detected' headers at that level
$sa_kill_level_deflt = 6.9;  # triggers spam evasive actions (e.g. blocks mail)
$sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
$sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
# SPAM.
$final_spam_destiny = D_DISCARD;
$spam_quarantine_method = 'sql:';
$spam_quarantine_to = 'spam-quarantine';

# Virus
$final_virus_destiny = D_DISCARD;
$virus_quarantine_method = 'sql:';
$virus_quarantine_to = 'virus-quarantine';



I believe these are the default settings.

Is there any issues with my configuration?.


The file "/opt/iredmail/custom/dovecot/dovecot.sieve"  empty.

Thanks
Abdul

----

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

2

Re: Incoming spam mails are not going to Junk folder

- iRedMail stores spam policy in SQL table "amavisd.policy", it overrides the settings in config file.
- Amavisd is configured to quarantine detected spams to SQL db instead of moving to Junk folder. You can update sql db to change this behaviour, like this:

USE amavisd;
UPDATE policy SET spam_lover='Y' WHERE policy_name='@.';

3

Re: Incoming spam mails are not going to Junk folder

Thank you

I will try this