1 (edited by alekperov11 2022-04-20 15:42:40)

Topic: No spam

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

iRedMail-1.4.2
FreeBSD 13.0-RELEASE
Mariadb
amavisd-new-2.12.0 (20190725)

Hi!
I've been using Iredmail for a year now.
I still don't get spam in my spam folder.
Where do all spam emails go?
What should I do to get spam emails into the spam folder?
I think they are currently being removed.
My spf record with ~all(not -all)
I have installed:
https://docs.iredmail.org/dovecot.imapsieve.html
https://docs.iredmail.org/store.spamass … n.sql.html

SELECT username,spam_count,ham_count FROM bayes_vars;
+----------+------------+-----------+
| username | spam_count | ham_count |
+----------+------------+-----------+
| vmail      |             1 |         750 |
+----------+------------+-----------+

sa-learn --dump magic
0.000          0          3          0  non-token data: bayes db version
0.000          0          1          0  non-token data: nspam
0.000          0        750          0  non-token data: nham
0.000          0      16850          0  non-token data: ntokens
0.000          0 1058995800          0  non-token data: oldest atime
0.000          0 1650409489          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync atime
0.000          0          0          0  non-token data: last expiry atime
0.000          0          0          0  non-token data: last expire atime delta
0.000          0          0          0  non-token data: last expire reduction count

SELECT * FROM policy WHERE policy_name='@.';
| id | policy_name | virus_lover | spam_lover | unchecked_lover | banned_files_lover | bad_header_lover | bypass_virus_checks | bypass_spam_checks | bypass_banned_checks | bypass_header_checks | virus_quarantine_to | spam_quarantine_to | banned_quarantine_to | unchecked_quarantine_to | bad_header_quarantine_to | clean_quarantine_to | archive_quarantine_to | spam_tag_level | spam_tag2_level | spam_tag3_level | spam_kill_level | spam_dsn_cutoff_level | spam_quarantine_cutoff_level | addr_extension_virus | addr_extension_spam | addr_extension_banned | addr_extension_bad_header | warnvirusrecip | warnbannedrecip | warnbadhrecip | newvirus_admin | virus_admin | banned_admin | bad_header_admin | spam_admin | spam_subject_tag | spam_subject_tag2 | spam_subject_tag3 | message_size_limit | banned_rulenames | disclaimer_options | forward_method | sa_userconf | sa_username |

|  1 | @.          | N           | Y          | NULL            | N                  | Y                | N                   | N                  | N                    | N                    | virus-quarantine    |                    | banned-quarantine    | NULL                    |                          | NULL                | NULL                  |           NULL |            NULL |            NULL |            NULL |                  NULL |                         NULL | NULL                 | NULL                | NULL                  | NULL                      | NULL           | NULL            | NULL          | NULL           | NULL        | NULL         | NULL             | NULL       | NULL             | NULL              | NULL              |               NULL | NULL             | NULL               | NULL           | NULL        | NULL        |

Readable

SELECT * FROM policy WHERE policy_name='@.';

id 1
policy_name @.
virus_lover N
spam_lover Y
unchecked_lover NULL
banned_files_lover N
bad_header_lover Y
bypass_virus_checks N
bypass_spam_checks N
bypass_banned_checks N
bypass_header_checks N
virus_quarantine_to virus-quarantine
spam_quarantine_to
banned_quarantine_to banned-quarantine
unchecked_quarantine_to NULL
bad_header_quarantine_to
clean_quarantine_to NULL
archive_quarantine_to NULL
spam_tag_level NULL
spam_tag2_level NULL
spam_tag3_level NULL
spam_kill_level NULL
spam_dsn_cutoff_level NULL
spam_quarantine_cutoff_level NULL
addr_extension_virus NULL
addr_extension_spam NULL
addr_extension_banned NULL
addr_extension_bad_header NULL
warnvirusrecip NULL
warnbannedrecip NULL
warnbadhrecip NULL
newvirus_admin NULL
virus_admin NULL
banned_admin NULL
bad_header_admin NULL
spam_admin NULL
spam_subject_tag NULL
spam_subject_tag2 NULL
spam_subject_tag3 NULL
message_size_limit NULL
banned_rulenames NULL
disclaimer_options NULL
forward_method NULL
sa_userconf NULL
sa_username NULL

amavisd.conf

$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
#$sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off

$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
$sa_local_tests_only = 0;    # only tests which do not require internet access?

....

# 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';
 
# Banned
$final_banned_destiny = D_DISCARD;
$banned_files_quarantine_method = 'sql:';
$banned_quarantine_to = 'banned-quarantine';
   
# Bad header.
$final_bad_header_destiny = D_DISCARD;
$bad_header_quarantine_method = 'sql:';
$bad_header_quarantine_to = 'bad-header-quarantine';

----

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

2

Re: No spam

Is anybody here?

3

Re: No spam

Please check /var/log/maillog to figure out whether Amavisd + SpamAssassin detected some spams and how the spams were handled.

4 (edited by alekperov11 2022-04-26 17:42:43)

Re: No spam

ZhangHuangbin wrote:

Please check /var/log/maillog to figure out whether Amavisd + SpamAssassin detected some spams and how the spams were handled.

What type of string do you need?
There are a lot of lines in the files maillog*.
maillog
maillog.0.bz2
maillog.1.bz2
maillog.2.bz2
maillog.3.bz2
maillog.4.bz2
maillog.5.bz2

5

Re: No spam

?

6

Re: No spam

Simply search "amavis" in mail log file.