Topic: spamassassin in iredmail
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====
Hello!
I have a question how manually to train spamassassin in iredmail. More precisely from whose name to do it?
I did training on behalf of root.
sudo sa-learn --ham /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/cur/
sudo sa-learn --spam /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/.Junk/cur/
but spamassassin passes spam.
When I check dump the created root:
sudo sa-learn --dump magic
0.000 0 3 0 non-token data: bayes db version
0.000 0 367 0 non-token data: nspam
0.000 0 267 0 non-token data: nham
0.000 0 67821 0 non-token data: ntokens
0.000 0 1551340818 0 non-token data: oldest atime
0.000 0 1555407937 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
I read that training needs to be provided from amavis. I once again watch dump from amavis
su amavis -c "sa-learn --dump magic"
0.000 0 3 0 non-token data: bayes db version
0.000 0 4 0 non-token data: nspam
0.000 0 117 0 non-token data: nham
0.000 0 48662 0 non-token data: ntokens
0.000 0 1551101810 0 non-token data: oldest atime
0.000 0 1555475276 0 non-token data: newest atime
0.000 0 0 0 non-token data: last journal sync atime
0.000 0 1555453446 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
The different quantity of spam/ham is analyzed from root and from amavis
I try to provide training from amavis
su amavis -c "sa-learn --ham /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/cur/"
archive-iterator: no access to /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/cur/: Permission denied at /usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm line 586.
archive-iterator: no access to /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/cur/: Permission denied at /usr/share/perl5/Mail/SpamAssassin/ArchiveIterator.pm line 828.
archive-iterator: unable to open /mnt/data/vmail/vmail1/mydomain.com/cgfv/Maildir/cur/: Permission denied
Learned tokens from 0 message(s) (0 message(s) examined)
It is clear. Directories of mail belong to the user of vmail
Tell me please from whose name and what command it is correct to provide training of spamassassin?
Thanks in advance also I apologize for my bad English!!!
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.