Am 28.12.2015 um 23:54 schrieb Peter L. Berghold:
I think you might be on to something here.   When I run

"sa-learn --dump magic"

as root and as amavis they are definitely different.  Here is the result
as "root" again:

so this is going to complicate how I educate SpamAsssassin about what
spam and ham are.   The script that I use to pull the messages out of a
spam bucket invoking sa-learn runs as root which has permissions to read
from anywhere.  The complication is the amavis does not have permissions
to read the Maildir files for trivial users like root does.

That said, I have some thoughts as how to solve that

well, you should never run such commands as root

https://wiki.apache.org/spamassassin/SiteWideBayesSetup

in the best case you configure both (training user and amavis) to use the same bayes database or you find a way to read the samples as non-root which is preferred anyways

spam-messages are by definition untrusted input and you should never proceed untrusted input with root permissions - under no condition at all, frankly sa-learn should refuse to run as root without a big warning and a "do not care" param which would avoid a lot of such threads where training as root has no effect because it's the wrong database

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to