summaryrefslogtreecommitdiff
path: root/init-mailmanarchive
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2001-12-12 19:52:40 +0000
committerJonas Smedegaard <dr@jones.dk>2001-12-12 19:52:40 +0000
commitc81b7f986867db292d62a1757123723b5ef66518 (patch)
treea217cf2f481ab7b3099ef76b519a4cc8e1786096 /init-mailmanarchive
Initial revision
Diffstat (limited to 'init-mailmanarchive')
-rwxr-xr-xinit-mailmanarchive28
1 files changed, 28 insertions, 0 deletions
diff --git a/init-mailmanarchive b/init-mailmanarchive
new file mode 100755
index 0000000..edcc240
--- /dev/null
+++ b/init-mailmanarchive
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+bindir="/usr/lib/mailman/bin"
+basedir="/var/lib/mailman/archives/private"
+
+[ $# == 0 ] && echo "Usage: `basename $0` <listname> [<listname>...]"
+
+for list in $@; do
+ mboxdir="$basedir/$list.mbox"
+ mboxfile="$mboxdir/$list.mbox"
+ htmldir="$basedir/$list"
+
+ if [ "x$1" != "" -a -d $mboxdir ]; then
+ echo "Renewing list \"$list\"..."
+
+ # Make sure the mbox file exists even if no mails are archived yet
+ touch $mboxfile && chown list.list $mboxfile && chmod 664 $mboxfile
+ rm -rf $htmldir
+
+# $bindir/arch $list
+ mkdir -p $htmldir && chown list.list $htmldir && chmod 2755 $htmldir
+ su list "mhonarc -outdir $htmldir -idxfname index.html -rcfile /etc/mailman/mhonarc.mrc -title \"$list Archive (by Date)\" -ttitle \"$list Archive (Threaded)\" $mboxfile"
+
+ echo "Done with list \"$list\"!"
+ else
+ echo "Problem renewing list \"$list\"."
+ fi
+done