Hi all!

I'm just upgrading to 3.0.1, and I think I'd like to use a PostgreSQL 
database for my Bayes DB. I'm setting it up with a user, and they say 
it is a Good Idea to give this user the privileges it needs, no more, 
no less. I couldn't find this documented anywhere (is it?), so I looked 
through the sources of Mail::SpamAssassin::BayesStore::SQL last night, 
and I came up with the following SQL:

CREATE USER thomasbayes WITH PASSWORD 'trustno1';

GRANT SELECT, UPDATE, DELETE, INSERT ON TABLE bayes_token TO 
thomasbayes;
GRANT UPDATE, SELECT, DELETE, INSERT ON TABLE bayes_vars TO thomasbayes;
GRANT SELECT, INSERT, DELETE ON TABLE bayes_seen TO thomasbayes;
GRANT SELECT, INSERT, DELETE ON TABLE bayes_expire TO thomasbayes;
GRANT SELECT ON TABLE bayes_global_vars TO thomasbayes;

Pretty much, I just added privileges on tables as I encountered them in 
the source... I don't really have a way to test this exhaustively, so 
I'm wondering if someone can check it out... 

BTW, if any Debian users here know a way to upgrade the libdb2 based 
bayes db to Pg, I would be happy to hear about it... The usual and 
documented upgrade path (dump to backup with sa-learn) is blocked, 
because I have upgraded Perl. This is Debian bug #188997.
I could build a new corpus, but this db contains a collection of spam 
and ham of mine back to antiquity and was very effective in the past...

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
[EMAIL PROTECTED]  [EMAIL PROTECTED]  [EMAIL PROTECTED]
Homepage: http://www.kjetil.kjernsmo.net/        OpenPGP KeyID: 6A6A0BBC

Reply via email to