spamassassin-dev October 2011 archive
Main Archive Page > Month Archives  > spamassassin-dev archives
spamassassin-dev: [Bug 3082] Implement History Plugin (which wil

[Bug 3082] Implement History Plugin (which will include expiry) to replace AWL

From: <bugzilla-daemon_at_nospam>
Date: Fri Oct 28 2011 - 16:08:37 GMT
To: dev@spamassassin.apache.org

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=3082

Kevin A. McGrail <kmcgrail@pccc.com> changed:

           What |Removed |Added
----------------------------------------------------------------------------
                 CC| |kmcgrail@pccc.com
   Target Milestone|Future |3.4.0

--- Comment #33 from Kevin A. McGrail <kmcgrail@pccc.com> 2011-10-28 16:08:37 UTC ---
I like Dallas' patch. As 7 years+ have passed with no one stepping forward to
patch this for a DB backend, the switch to 3.4.0 is the ideal time to change
AWL's table format and recommend a cron job.

If it only benefits mySQL users, it can be extended later.

I myself can't expire my Bayesian tokens except via cron to avoid mid-day
spikes. So I use a cron job to clear my old AWL entries.

But I use an implementation based on Kris Deugau where I add a column to my
table with an index:

alter table awl add column `lastupdate` timestamp NOT NULL default
CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP;

ALTER TABLE `awl` ADD INDEX ( `lastupdate` )

Then I use a cron job nightly that runs these queries:

/usr/local/mysql/bin/mysql spamassassin -u spamassassin -premoved -e 'DELETE
FROM awl WHERE lastupdate <= (now() - INTERVAL 15 day) and count < 5;'
/usr/local/mysql/bin/mysql spamassassin -u spamassassin -premoved -e 'DELETE
FROM awl WHERE lastupdate <= (now() - INTERVAL 30 day) and count < 10;'
/usr/local/mysql/bin/mysql spamassassin -u spamassassin -premoved -e 'DELETE
FROM awl WHERE lastupdate <= (now() - INTERVAL 60 day) and count < 20;'
/usr/local/mysql/bin/mysql spamassassin -u spamassassin -premoved -e 'DELETE
FROM awl WHERE lastupdate <= (now() - INTERVAL 120 day);'

This seems very in line with Dallas' patch. However, his solution and mine are
only test with mysql and ignore DB and postgres.

So at a minimum, these are good additions for the README.awl that could then
close this ticket though a new ticket for the wildcard entries could be open.
That's a good idea that has still never been done but left orphaned in this
ticket.

-- Configure bugmail: https://issues.apache.org/SpamAssassin/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.