[Mailman-Users] dividing list mbox
Mark Sapiro
mark at msapiro.net
Tue Feb 26 17:24:39 CET 2008
liste yoneticisi wrote:
>
>How can i divide the file "listname.mbox" in the directory
>"listname.mbox/" by day.
Set up a cron job to run at daily at 23:59 and do something like
#!/bin/bash
suffix=`date +%Y%m%d`
sleep 60
if [[ -f /path/to/archives/private/listname.mbox/listname.mbox ]]
then mv /path/to/archives/private/listname.mbox/listname.mbox \
/path/to/archives/private/listname.mbox/listname.mbox.$suffix
fi
Although you'd probably want to break it into subdirectories by month
and possibly year so as not to accumulate too many files in one
directory.
Moving the file aside is not a problem for the archiver which will just
create a new one the next time it archives a message.
--
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list