System bogofilter_dir and permission issues
mike at kleinnet.com
Mon Feb 21 01:37:03 UTC 2011
Hi, newbie to the list.
I've been running bogofilter 1.1.5 under Ubuntu 8.04 on a user-by-user basis for some time and it works well. Each user maintains ham and spam email folders and the wordlist.db were set up individually for each user under their ~/.bogofilter dirs. Filtering is done through procmail. But increasingly the discrimination was not working as well as before and I've looked at how to improve that.
Recently I tried improving discrimination results by running bogotune on a collection of all users' ham and spam corpus (I save these) and entering the resulting parameters into /etc/bogofilter.cf. The results were much better than the defaults that I had been using. But I would prefer going all the way to a single, centralized wordlist as (I think) it doesn't make sense to have a centralized parameter set, yet separate users' wordlists.
I have been struggling to get this working for a couple of days and there appears to be very little on the web that my searches have found about how to get this working. Of course setting bogofilter_dir=/var/spool/bogofilter is the first thing. But the permissions of that directory and the files created in it are critical. If I also set db_transaction=yes then bogofilter either fails with a permission error or simply hangs, except for the first user who gets the various DB files set up under their ownership. If I chmod the various files to 666 then things seem to work as long as I don't set db_transaction=yes, but I still get the following error in syslog (I'm running bogofilter with the "-l" option to get logging):
bogofilter: datastore_db_trans.c:933: cannot join environment: Permission denied
and yet the filtering works:
bogofilter: X-Bogosity: Ham, spamicity=0.000000, version=1.2.2, register-n, 228 words, 1 messages
Does anyone have experience with running bogofilter from a central directory, ideally with transactions (I assume this would be safer??), and without kludging file modes as I've done to get this working so far? And if kludging file modes *is* the only way, is there any definitive method for that?
I'm running Ubuntu 8.04. The version of bogofilter that is supported under Ubuntu 8.04 is only 1.1.5 and so I downloaded and locally compiled 1.2.2 in the hope that would improve things, but the behavior is exactly the same.
Thanks for any help,
More information about the Bogofilter