Re: Huge Greylist MySQL table

Paul Venezia <[email protected]>
Newsgroups gmane.mail.spam.greylist.user
Message-ID <[email protected]>
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";

-Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.