Andy Jezierski wrote: > > > Are you running the spamassassin command under the same userid as spamd > is running under? Looks like spamd is using bayes that spamassassin did > not have, and spamassassin had a negative AWL score that spamd didn't > have.
Definitely not. Look at the prompts. Miguel is running spamassassin as root. Miguel is running spamc as root, but spamd will *NEVER* scan mail as root. It will setuid itself to nobody if it finds this situation. This causes a huge difference, because only the root account has bayes training, but spamd will never use it. Notice that the spamassassin (run as root) version has BAYES_95 matching, but the spamc one does not. Miguel, this is your problem: you can't train with sa-learn as root and expect this to impact mail run through spamc, unless you set up a global bayes database. Ideally, I'd suggest creating a "spamd" user, and running spamd with -u spamd. Then when you train mail with sa-learn, just su yourself to spamd first. This way everything all gets scanned using the same bayes db. You also get the security benefit of all scanning being done as a user that isn't used for anything else. If that's not practical, use bayes_path and bayes_file_mode 0777 together in your local.cf to create a single bayes DB that gets used no matter what user calls SA. (Warnings: use bayes_file_mode 0777, not 0666. Also, read the docs on bayes_path very carefully. It's not just a path. The last part is actually the start of a filename, not a directory name)