#!/usr/bin/perl
#######################################################################

use FindBin qw($Bin);
use lib "$Bin";

use strict;
use DBI;
use SnowlistConfig;

#######################################################################

my($config) = SnowlistConfig::LoadConfig();

my $dbh = db_connect($config);
my $sth = $dbh->prepare(q{
	DELETE FROM messages
	WHERE age(msg_received) > interval ?
});
$sth->execute($config->{'msg_expire'});

$dbh->disconnect;
