I've done an 'enhanced' version of the script, which respects the TOE flag, and does everything in one sequential scan of the token table instead of 4. I've already done a post on this subject on January 24th. I don't know what backend you're using (I'm using Postgres), so maybe the script isn't fully compatible...
On Tuesday 13 March 2007 13:09, System Administrator wrote: > Hey everyone, > While reading the doco for the pgsql driver i noticed it says to use > purge-pe.sql script to purge stale tokens if TOE is used as user > preference, which is what im using(the default is TUM which is set in > dspam.conf). I only find purge.sql script which is ignorant of > user preferences. I have compiled with preferences-extension and all, its a > working system. > > This is the purge.sql script that im using at the moment which is ignorant > of user preferences. > > DELETE FROM dspam_token_data > WHERE (innocent_hits*2) + spam_hits < 5 > AND last_hit < CURRENT_DATE - 60; > > DELETE FROM dspam_token_data > WHERE innocent_hits = 1 AND spam_hits = 0 > AND last_hit < CURRENT_DATE - 15; > > DELETE FROM dspam_token_data > WHERE innocent_hits = 0 AND spam_hits = 1 > AND last_hit < CURRENT_DATE - 15; > > DELETE FROM dspam_token_data > WHERE last_hit < CURRENT_DATE - 90; > > DELETE FROM dspam_signature_data > WHERE created_on < CURRENT_DATE - 14; > > VACUUM ANALYSE; > > Thank you in advance. > > Petr
