Am 23.06.2015 um 06:05 schrieb Michael B Allen:
Yes, I want a system-wide bayes db. And I am running spamd and spamc and I assume that is all working (but of course I have no idea if it really is).But I want users to be able to put spams that get through into ~/Maildir/.LearnAsSpam and then, every once in a while, I want to run sa-learn on all of those messages for the system-wide db.
you need to somehow move that messages in the folder where you run sa-learn from and you should consider keep that samples to have the option completly rebuild the database from scratch - SA 3.4.1 as example brought some changes which justified the rebuild with our currently 40000 samples
So can that be done without running sa-learn as root?
yes, see above it needs work on your side, SA is a framework
Ideally I would think sa-learn should be able to run as root just to access files but use a spamd child to process them and update the bayes db. Possible?
you don't understand how it works: they bayes db is in fact a file living in the userhome, spamd is using that database file, sa-learn is a command-line utility to fill up that database, not more and not less
there is no single reason to run anything of that as root except the script you write for sa-learning could make sure that the spamd user has read permissions and sa-learn get fired with the spamd-user
su -c "sa-learn --max-size=0 --spam /folder/with/spam" - spamd-user su -c "sa-learn --max-size=0 --ham /folder/with/ham" - spamd-userand yes, the site-wide bayes is a good idea even if it needs some work because otherwise *each user* would need to train 400 spam as well as 400 ham samples for his own bayes and expierience shows that won't happen
signature.asc
Description: OpenPGP digital signature