You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jason Frisvold <xe...@gmail.com> on 2004/10/13 03:31:28 UTC

Expiring AWL entries

Is there any accepted method for expiring AWL entries?  I'm currently
using the SQL implementation of AWL.

If there was no accepted method, my plan was to add a TIMESTAMP field
to the database and expire old records...

Thanks!

-- 
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com

Re: Expiring AWL entries

Posted by Jason Frisvold <xe...@gmail.com>.
On Tue, 12 Oct 2004 22:04:49 -0500, Michael Parker <pa...@pobox.com> wrote:
> How odd, I was just writing a blurb about this in my ApacheCon
> presentation.  In the future, AWL will have some sort of expiration,
> in the mean time, with SQL, I've had great success with a lastupdate
> of type TIMESTAMP column that gets automatically updated whenever the
> row is changed, which also happens to be last access for AWL.

Awesome..  It's nice to know I've got the right idea for this...  :)
 
> Then you can do cool things like:
> delete from awl where lastupdate < 2040701000000;
> to delete anything that hasn't been updated since the first of July.

Yup!  That was the plan ...  Then I can have a cron job that runs an
expire script each night to expire entries older than x days, and
single count entries older than y days.  Just deleting the single
count entries without checking for age doesn't seem right...  I'll
probably delete entries older than 30 days, and single count entries
older than 24 hours.

> Hope that helps.

Yup!  Thanks!
 
> Michael

-- 
Jason 'XenoPhage' Frisvold
XenoPhage0@gmail.com

Re: Expiring AWL entries

Posted by Michael Parker <pa...@pobox.com>.
On Tue, Oct 12, 2004 at 09:31:28PM -0400, Jason Frisvold wrote:
> Is there any accepted method for expiring AWL entries?  I'm currently
> using the SQL implementation of AWL.
> 
> If there was no accepted method, my plan was to add a TIMESTAMP field
> to the database and expire old records...
> 

How odd, I was just writing a blurb about this in my ApacheCon
presentation.  In the future, AWL will have some sort of expiration,
in the mean time, with SQL, I've had great success with a lastupdate
of type TIMESTAMP column that gets automatically updated whenever the
row is changed, which also happens to be last access for AWL.

Then you can do cool things like:
delete from awl where lastupdate < 2040701000000;
to delete anything that hasn't been updated since the first of July.

Also lets you do a quick:

delete from awl where count = 1;

To get rid of all the single message hits.

Hope that helps.

Michael