Add learning feature like in rspamd

patefoniq

Well-Known Member
Jan 7, 2019
72
13
48
44
Poland
syslink.pl
Hi,

in short.

Is there any possibility to add one feature like in rspamd? I mean manual learning from raw e-mail:

1603366191070.png
It's the best way to check if the rule works properly.
 
You can hook this with some scripts and configuration. Here's what I'm doing, working with Zimbra as backend email server :
  1. In Zimbra, there's always specials spam and ham users, where emails are fowarded when a user mark a mail as spam or as ham
  2. In Zimbra, I create an IMAP account for PMG, which has access to both the spam and ham accounts (their INBOX appear as IMAP folders)
  3. Now on PMG, add a script like this one : https://git.fws.fr/fws/ansible-roles/src/branch/master/roles/pmg/files/imap-sa-learn
The script will open the PMG imap account and feeds the baysian filtering with what's in there (either as spam, or as ham, based on the IMAP folder where the emails are). You just have to set the approriate env vars, and setup a cron job. Or a systemd service + timer (see https://git.fws.fr/fws/ansible-roles/src/branch/master/roles/pmg/templates/imap-sa-learn.service.j2 and https://git.fws.fr/fws/ansible-roles/src/branch/master/roles/pmg/templates/imap-sa-learn.timer.j2)

Hope it helps.
Regards, Daniel
 

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!