[Greylist-users] Huge Greylist MySQL table
pvenezia at jpj.net
Wed Dec 14 11:26:26 PST 2005
On Wed, 2005-12-14 at 10:21 -0800, Brian Ross wrote:
> I'm just going to second Paul's comment below.
> The reporting table will grow without bounds unless you take administrative
> action or update the code (unless the CVS version has fixed this).
Something like this should work, added to db_maintenance.pl:
# delete any rows that expired more than an hour ago
my $rows = $dbh->do("DELETE FROM relayreport WHERE record_expires <
NOW() - IN
TERVAL 90 DAY AND origin_type = 'AUTO'");
print "$rows expired rows deleted from reporting table\n";
More information about the Greylist-users