summaryrefslogtreecommitdiffstats
path: root/roles/mailman/files/dump_mailman.sh
blob: 4626e31bf82f55b335aaf8af2810bf429ab476ec (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
DIR=/var/backups/mailman/
[ -d $DIR ] || mkdir -p $DIR

for i in $(/usr/lib/mailman/bin/list_lists -b); do
    for j in admins members owners; do
        /usr/lib/mailman/bin/list_${j} > $DIR/${i}.${j}
    done
    /usr/lib/mailman/bin/config_list -o $DIR/${i}.config ${i}
done