- edited description
spamassassin training data gone after container update
I periodically train spamassassin using:
# learn spam
sa-learn --showdots --no-sync --spam /data/domains/[mydomain]/[user]/Maildir/.Junk/{cur,new}
# learn ham
sa-learn --showdots --no-sync --ham /data/domains/[mydomain/[user]/Maildir/{cur,new}
# sync db
sa-learn --showdots --sync
# see learning results
sa-learn --dump magic
After the container update, this data is lost. Where is this data stored and how can this be setup to be persistent (like other settings).
Comments (5)
-
reporter -
+1!
I have similar solution in place, but in order to keep the functionality when deploying new container I have the following crontab on the host running docker:
- 2 * * * docker exec -it poste /usr/bin/sa-learn --no-sync --spam /data/domains/[domain]/[user]/Maildir/.Junk/cur
- 3 * * * docker exec -it poste /usr/bin/sa-learn --no-sync --ham /data/domains/[domain]/[user]/Maildir/cur
- 4 * * * docker exec -it poste /usr/bin/sa-learn --sync
For an implementation in Poste.io I would suggest a checkbox for each account that says: "Use this account for teaching spamassassin" and then this account + domain will be using the syntax above.
I guess that access to this checkbox needs to be for administrators only =)
BR Tilly
-
repo owner - changed status to closed
Closing - we have ditched spamassassin for rspamd. Autolearn should be working automaticaly
-
Awesome. How does it learn? From users inbox / spam folders? Plugin to the webmail to learn when moving to spam?
BR Tilly
-
Yes, I would like to know this too! Because I am still getting some spam through.
- Log in to comment