On Tue, May 10, 2005 at 05:36:53PM +0100, Tim Bishop wrote:
> I've been running with bayes in a MySQL database for a while now, and I
> need to start dealing with cleaning up users who are no longer here. I
> also have AWL and configuration in the database.
> 
> So, I think I'm looking at something like the following to delete
> someone's data from the database:
> 
> 1. Delete all entries in spamassassin.awl where the username is the user
>    I want to get delete.
> 2. Delete all entries in spamassassin.userpref where the username is the
>    user I want to delete.

Yeah, this is pretty much the best way to do this right now.

> 3. Delete all the entries in bayes_expire, bayes_seen, and bayes_token
>    where the id matches the id field in bayes_vars for the username.
> 4. Delete the entry in bayes_vars for the username.

Best way to do this is with sa-learn:
sa-learn -u <username you want to remove> --clear

> So, I have two questions.
> 
> Is that all I need to do?

Should be.

> Is it safe to do it - will spamassassin care that entries have vanished?

Should be ok, if anything else comes in to process for that user then
the AWL and Bayes entries will just be recreated.

Michael

Attachment: pgpTUZx44A54a.pgp
Description: PGP signature

Reply via email to