spamassassin learning from spam folder

4 posts / 0 new
Last post
#1 Thu, 02/15/2018 - 09:41
chgerwig

spamassassin learning from spam folder

Hi,

I want to optimize spamassassin and know that this is possible to run a sa-learn command with the option --spam through the spam folder. I know that spam mails are put there from spamassassin, but spamassassin does not recognize the spam mails which the user - which uses IMAP - has moved there. Also the other way round this command with the --ham option should be used in the inbox, if the user moved some good mails from the spam folder to the inbox.

Any suggestions how I can do this with a script for all users on my server?

Best reagards, Christian

Tue, 12/24/2019 - 02:57
tmkis

I'd like to do exactly the same thing - no one with a solution for this?

Tue, 12/24/2019 - 04:09
knightrideruk

Hi Look at the following site which was how I set up sa-learn. Pay particular attention to the mailbox type you are using. Also make sure you have a good upto date backup before starting. http://faisal.com/docs/salearn.html Regards Knightrideruk

out of the darkness comes light...........

Knightrideruk

Out of the darkness comes light.................

Wed, 12/25/2019 - 12:49
tmkis

Thx knightrideruk. I am not that new to sa-learn and I was aware of the -u option to change to the appropriate user but even when using -u sa-learn faills.

Example:

~# sa-learn -u <username> --dump magic
ERROR: Bayes dump returned an error, please re-run with -D for more information

Okay with -D it gives more "info" about the Problem:

~# sa-learn -u tmkis --dump magic -D
.....
Dec 25 19:43:40.676 [12202] dbg: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
....
Dec 25 19:43:40.678 [12202] dbg: bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks

Any idea why and how Virtualmin does the user switch for the spamtrap and hamtrap mails?

Topic locked