[Mailman-Users] archive rotation

Jon Carnes jonc at nc.rr.com
Wed Mar 10 15:13:25 CET 2004


On Wed, 2004-03-10 at 02:20, Al Black wrote:
> Hi everyone,
> 
> I'm wondering if anyone has a script that manages archive rotation.  I'm 
> thinking of something that can run from cron and keeps messages that have 
> been around less than an month (30 days, etc), and discarding the rest.
> 
> I remember from some early looks through the list archives on a different 
> topic that someone posted a perl script to the list, but after a couple 
> hours of looking I can't seem to turn it up.
> 
> Thanks in advance,
> al
> 
I use logrotate at my sites to rotate my logs monthly. It's simple to
setup and it's already running on most systems. I generally keep 4
months worth of back logs.

=== /etc/logrotate.d/mailman ===
/var/log/mailman/bounce /var/log/mailman/digest /var/log/mailman/error
/var/log/mailman/post /var/log/mailman/smtp
/var/log/mailman/smtp-failure /var/log/mailman/qrunner
/var/log/mailman/locks /var/log/mailman/fromusenet
/var/log/mailman/subscribe /var/log/mailman/vette {
    missingok
    sharedscripts
    postrotate
        /var/mailman/bin/mailmanctl reopen >/dev/null 2>&1 || true
    endscript
}

===
Note: that's one huge wrapped line at the top containing all the mailman
log file names. 

Note2: I believe that this is included in the Mailman source
distribution (maybe as a contrib).

Also of note, right after the logrotate I kick off my monthly reporting
scripts which email the list admins with their monthly usage stats.

Good Luck - Jon Carnes





More information about the Mailman-Users mailing list