Letβs say I have an old inactive mailing list (which ID is old-ml) for which I want to merge its archives to another one (called active-ml).
To do so, I have to merge the two mbox files holding all mails since the creation of these mailing-lists. I first tried to use cat to concatenate the two mbox files be it didnβt work.
Luckily, I found a Python script to merge 2 mbox files while sorting all mails by date. Here is how I uses it:
1$ cd /var/lib/mailman/archives/private
2$ wget https://mail.python.org/pipermail/mailman-users/attachments/20080322/80455064/attachment.txt --output-document=mbmerge.py
3$ python ./mbmerge.py ./old-ml.mbox/old-ml.mbox ./active-ml.mbox/active-ml.mbox > ./active-ml.mbox/active-ml.mbox.new
Then I switched the current mbox with the one generated above and asked mailman to regenerate the static HTML archives:
1$ cd /var/lib/mailman/archives/private/active-ml.mbox/
2$ mv active-ml.mbox active-ml.mbox.backup
3$ mv active-ml.mbox.new active-ml.mbox
4$ chown list:list active-ml.mbox*
5$ /usr/lib/mailman/bin/arch --wipe active-ml
Of course this will only merge mail archives. You still have to merge your old mailing lists parameters (including membership) manually.
At last, when everything is clean to you, you can safely remove your old mailing-list:
1$ rmlist -a old-ml
2$ /var/lib/mailman/bin/genaliases