Ticket #496 (assigned enhancement)
Add date-based expiry to the AWL table via maiadbtool's --prune-awl option
| Reported by: | rjl | Owned by: | rjl |
|---|---|---|---|
| Priority: | normal | Milestone: | post-1.0.3 triage |
| Component: | Perl scripts | Version: | 1.0.2 |
| Severity: | normal | Keywords: | maiadbtool.pl awl expiry |
| Cc: |
Description
SpamAssassin's AWL table does not have a built-in expiry mechanism, so it will grow without bound. The --prune-awl feature of maiadbtool.pl will expire entries that have fewer than a given number of occurrences, which helps to weed out the one-off entries that take up space, but it would be more effective to add an age-based expiry criterion.
An auto-updating timestamp column can be added to the AWL table, such that timestamps are automatically assigned to new records and existing records have their timestamps updated whenever other columns are changed (e.g. with an "ON UPDATE" clause for MySQL, or a "TRIGGER" for PostgreSQL). This requires no changes to SpamAssassin, as the timestamps are managed entirely by the database.
From there, maiadbtool.pl should only need to look for another (optional) parameter to --prune-awl, specifying the minimum age (in days) of records to delete.

