1

Topic: Auto learn spam/ham seems broken

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.7.1 OPENLDAP edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Debian GNU/Linux 12 (bookworm)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====

I follow all instruction on https://docs.iredmail.org/dovecot.imapsieve.html, use set as spam plugin buit checking spam : it's seems only the mail reader learn span (kmail currently).

All update are done, but when tetsing f somthing happe,n : seems nothing are done.

root@nedra:~# cd /etc/dovecot/
root@nedra:/etc/dovecot# grep -r "mail_debug" *
conf.d/10-logging.conf:# mail_debug and auth_debug settings.
conf.d/10-logging.conf:#mail_debug = no
dovecot.conf:mail_debug = yes
root@nedra:~# grep sieve /var/log/dovecot/imap.log
root@nedra:~# bash /etc/dovecot/sieve/scan_reported_mails.sh
root@nedra:~# grep sieve /var/log/dovecot/imap.log
root@nedra:~# tail /var/log/syslog
2026-04-23T10:46:33.646578+02:00 nedra postfix/postscreen[19574]: PASS OLD [104.155.105.12]:12868
2026-04-23T10:46:33.654906+02:00 nedra postfix/postscreen[19574]: PASS OLD [104.155.105.12]:12898
2026-04-23T10:46:34.182158+02:00 nedra postfix/smtpd[19653]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:46:34.362819+02:00 nedra postfix/smtpd[19655]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:46:34.706589+02:00 nedra postfix/smtpd[19657]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:46:34.995340+02:00 nedra postfix/smtpd[19658]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:46:35.341956+02:00 nedra postfix/smtpd[19659]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:46:35.713417+02:00 nedra postfix/smtpd[19660]: connect from 12.105.155.104.bc.googleusercontent.com[104.155.105.12]
2026-04-23T10:47:01.064735+02:00 nedra CRON[19678]: (*****) CMD (sh /home/*****/vault_pull.sh >> /home/*****/logs/vault_pull.log 2>&1)
2026-04-23T10:47:01.074723+02:00 nedra CRON[19679]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)

and

root@nedra:~# su -s /bin/bash amavis -c "sa-learn --dump magic"
0.000          0          3          0  non-token data: bayes db version
0.000          0       2124          0  non-token data: nspam
0.000          0      11905          0  non-token data: nham
0.000          0     200731          0  non-token data: ntokens
0.000          0 1776204760          0  non-token data: oldest atime
0.000          0 1776931921          0  non-token data: newest atime
0.000          0 1776932414          0  non-token data: last journal sync atime
0.000          0 1776900277          0  non-token data: last expiry atime
0.000          0     691200          0  non-token data: last expire atime delta
0.000          0      11211          0  non-token data: last expire reduction count

What can i do to control if something is really done ?

Post's attachments

Capture d’écran du 2026-04-23 10-52-36.png 134.74 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Auto learn spam/ham seems broken

I review all , set some ham to spam

and

root@nedra:~# /bin/bash /etc/dovecot/sieve/scan_reported_mails.sh
root@nedra:~# tail /var/log/dovecot/dovecot.log
2026-04-27T16:07:38.469632+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): conn unix:/run/dovecot/dict (pid=259817,uid=0): Connecting
2026-04-27T16:07:38.469748+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): conn unix:/run/dovecot/dict (pid=259817,uid=0): Client connected (fd=18)
2026-04-27T16:07:38.470141+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Lookup finished for 'priv/quota/storage': found
2026-04-27T16:07:38.470313+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Lookup finished for 'priv/quota/storage': found
2026-04-27T16:07:38.470418+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Looking up 'priv/quota/messages'
2026-04-27T16:07:38.470548+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Looking up (async) 'priv/quota/messages'
2026-04-27T16:07:38.470819+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Lookup finished for 'priv/quota/messages': found
2026-04-27T16:07:38.470952+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): Lookup finished for 'priv/quota/messages': found
2026-04-27T16:07:38.471065+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: dict(proxy): conn unix:/run/dovecot/dict (pid=259817,uid=0): Disconnected: Connection closed (fd=18)
2026-04-27T16:07:38.488484+02:00 nedra dovecot: imap(courriel@example.net)<260804><nWc5RXFQWOtSQd5N>: Debug: acl vfile: file /var/vmail/vmail1/example.net/c/o/u/courriel-2021.01.15.17.51.25//Maildir/dovecot-acl not found

And no scan_reported_mails in /var/log/syslog sad