Chip wrote:

Michael Parker wrote:

On Thu, Mar 31, 2005 at 01:23:24PM -0500, Chip wrote:


I have things setup so each user has a spam folder that they will put missed spam in. This folder will later be trained from cron jobs using sa-learn. The problem is, it seems that sa-learn is ignoring the -u / --user= flag. No matter what I set it to, it trains for root instead of that user. I am verifying this by checking the /root/.spamassassin/ directory. Each time I run sa-learn, the bayes files in the directory are updated, instead of the files in /usr/home/<user>/.spamassassin/


This is a feature/shortcoming in the -u option for sa-learn when using
non-SQL based bayes storage modules.  That is why the documentation
states:
 You can use this option to specify users in a virtual user
 configuration.

Otherwise the bayes path, if unset via dbpath or in a .cf file is
expanded to be in $ENV{HOME} which in your case is /root/.

I added the -u specifically for BayesSQL users, since it doesn't refer
to an actual directory on the filesystem.

Feel free to file a bug report, but honestly it might end up being a
documentation patch saying that -u is not effective for DBM storage.

BTW, you can easily accomplish the same thing as root using su -c or
similar mechanisms.

Michael


Ahh ok. Make sense! I will change to a sql backend, as my users have no shell access and can't run the command as themselves. Thanks for the clarification!


Changing the backend storage driver worked perfectly, well almost. When using DBM storage, the user_prefs file was automatically created when a new user got its first mail. Now using mySQL, the userpref table is empty. Is this the default behavior? Reason I ask is with no examples of what to put in the table, I am unsure of the syntax ;)



Reply via email to