Bayes training?

Apr 9, 2018
15
0
21
46
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?
 
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.
 
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!
 
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.
 
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
 
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, Proxmox Backup Server, 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 yours easily in our online shop.

Buy now!