Bayes training?

Apr 9, 2018
10
0
1
42
Hi all

I notice that bayes is not working well for me, mostly dutch language mails and real SPAM almost always gets a score of -1.9 (BAYES). Disabling it actually improves spam blocking...

Is there a way to train the filter or do I just use the default sa-learn on the CLI?
 

heutger

Active Member
Apr 25, 2018
695
184
43
Fulda, Hessen, Germany
www.heutger.net
Hi all

I notice that bayes is not working well for me, mostly dutch language mails and real SPAM almost always gets a score of -1.9 (BAYES). Disabling it actually improves spam blocking...

Is there a way to train the filter or do I just use the default sa-learn on the CLI?
How did you got this scores? From bayes autolearn? You should get your users copy (not forward!) mails with spam to a spam folder/mailbox as well as ham mails, which got recognized as spam. Then use sa-learn to learn such messages. If you're on a linux based system and familiar with coding, I still look for someone, who could use Dovecot Sieve (there are tutorials therefor) to invoke a script, in this case invoke a remote sa-learn on the PMG system. That's why I'm asking, if it wouldn't be an idea to combine PMG with e.g. Kolab or sth. similar, which would make PMG a full mail solution. It would then be easier to adopt a direct spam and ham learning just by user actions.
 

guletz

Well-Known Member
Apr 19, 2017
1,021
144
63
Brasov, Romania
Hi @heutger,

Maybe a stupid ideea ... ;)

On the PMG you can create some kind of remote share who is mounted on your server where the users imbox's are. Then you can use this remote share for ham/spam global for all of your users. On the PMG you can use incrond daemon to watch any new created files/mails(new spam or ham) and on this event you can run any bash script like:
- run sa-learn spam/ham
- remove the mails who was learned

I do not think that you need a lot of I/O operations in your case at least ;) , so the share will not be need to be so fast!

Good luck!
 

heutger

Active Member
Apr 25, 2018
695
184
43
Fulda, Hessen, Germany
www.heutger.net
Hi @heutger,

Maybe a stupid ideea ... ;)

On the PMG you can create some kind of remote share who is mounted on your server where the users imbox's are. Then you can use this remote share for ham/spam global for all of your users. On the PMG you can use incrond daemon to watch any new created files/mails(new spam or ham) and on this event you can run any bash script like:
- run sa-learn spam/ham
- remove the mails who was learned

I do not think that you need a lot of I/O operations in your case at least ;) , so the share will not be need to be so fast!

Good luck!
Maybe an idea as well, however, not really nice.
 
Jan 21, 2017
280
26
28
30
Berlin
Does anybody have a service setup to collect ham and spam from a mailcluster, build new bayes and distribute them on PMGs?

Backend:
- Dovecot
- Postfix
- Dovecot Director
- Dovecot LMTP
- Other Cluster stuff
 

Janko

Member
May 15, 2011
33
1
8
I import the Mails via Rsync over SSH an put them through SA-Lern.

Code:
#!/bin/bash

rsync -av -e "ssh -p 8899" root@first.server.com:/var/qmail/mailnames/*/*/Maildir/.Spam/cur/ /var/spam/
rsync -av -e "ssh -p 8899" root@second.server.com:/var/qmail/mailnames/*/*/Maildir/.Spam/cur/ /var/spam/
rsync -av -e "ssh -p 8899" root@third.server.com:/var/qmail/mailnames/*/*/Maildir/.Spam/cur/ /var/spam/



sa-learn --dbpath /var/lib/amavis/.spamassassin --progress --spam /var/spam/
rm -rf /var/spam/*



Code:
#!/bin/bash

rsync -av -e "ssh -p 8899" root@first.server.com:/var/qmail/mailnames/*/*/Maildir/cur/ /var/ham/
rsync -av -e "ssh -p 8899" root@second.server.com:/var/qmail/mailnames/*/*/Maildir/cur/ /var/ham/
rsync -av -e "ssh -p 8899" root@third.server.com:/var/qmail/mailnames/*/*/Maildir/cur/ /var/ham/



sa-learn --dbpath /var/lib/amavis/.spamassassin --progress --ham /var/ham/
rm -rf /var/ham/*


This is for a Plesk Mail Server.
 
  • Like
Reactions: guletz

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE and Proxmox Mail Gateway. We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!