1

Topic: Training the spam filter

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hallo,

In the last weeks I receive more SPAM mails about sexual enhancers and bitcoins. Is it possible to configure or train the spam filter so that users are no longer annoyed by these mails?

Many thanks in advance!

----

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

2

Re: Training the spam filter

You can collect the spams, then run "sa-learn" command as Amavisd daemon user to learn spam.

3

Re: Training the spam filter

How do I collect spam? Do I have to move it to the spam folder?

And then I have to do this?:

sudo -u amavis sa-learn

4

Re: Training the spam filter

alex42 wrote:

How do I collect spam? Do I have to move it to the spam folder?

You can use Roundcube plugin "markasjunk" to collect spam. When user moves one email to "Junk" folder, the email will be considered as spam, you can configure 'markasjunk' to run 'sa-learn' when mail was moved to Junk.

5

Re: Training the spam filter

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Linux/BSD distribution name and version: Ubuntu
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Manage mail accounts with iRedAdmin-Pro? No
====

I want to clarify process of training the spam filter. I found following articles
Store SpamAssassin bayes in SQL
Auto learn spam/ham with Dovecot imap_sieve plugin

My questions are:
1. Does the installer (*.tar.gz) configure autolearn functionality ?
2.If not what step should I do to configure it ? Is it enough to do this Store SpamAssassin bayes in SQL and then Auto learn spam/ham with Dovecot imap_sieve plugin ?


I also checked sa-learn

 su -s /bin/bash amavis -c "sa-learn --dump magic" 
 
0.000          0          3          0  non-token data: bayes db version
0.000          0          0          0  non-token data: nspam
0.000          0       2416          0  non-token data: nham
0.000          0     132223          0  non-token data: ntokens
0.000          0 1606038707          0  non-token data: oldest atime
0.000          0 1606902065          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal sync atime
0.000          0 1606872248          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

What does value in columns means ?

Thanks in advance,
Roman

6

Re: Training the spam filter

koval.roma wrote:

1. Does the installer (*.tar.gz) configure autolearn functionality ?

Not in the downloadable iRedMail installer, but it's implemented in the iRedMail Easy platform (https://www.iredmail.org/easy.html )

koval.roma wrote:

2.If not what step should I do to configure it ? Is it enough to do this Store SpamAssassin bayes in SQL and then Auto learn spam/ham with Dovecot imap_sieve plugin ?

Latter one is required, but first one is optional but highly recommended for better performance.

7

Re: Training the spam filter

thanks!