#!/usr/bin/perl -w # # Clears out the waiting (presumably junk) mail from mailman # # Last updated by rb on Sun Dec 21 23:56:38 EST 2003 # use strict; use Net::SSH qw/ssh/; # All my mailing lists that I want this done to. my @lists= qw/ agora cfs-journallers cfs-p cfs-w ozme disabledartists foothold pages /; my $mailman_user = "list"; my $mailman_host = "tertius.net.au"; my $mailman_dir = "/var/lib/mailman/data"; my $lists_list = join("|", @lists); my @commands; foreach (@lists) { my $command = "rm -vf $mailman_dir/heldmsg-$_*.txt"; print "\nProcessing list $_ ...\n"; # print the URL so its easy to follow in the email if I can # see deleted messages I know I need to go there to clean it # out. Can't automate this part because of old version of # mailman with no 'do-nothing' option for subscribes. print "URL: http://tertius.net.au/mailman/admindb/$_\n"; ssh("$mailman_user\@$mailman_host", $command); } # # Ende. #