![[identity profile]](https://www.dreamwidth.org/img/silk/identity/openid.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
Did you ever wonder whatever happened to the Daughter of Bilitis?
It was destroyed when a disgruntled member/volunteer stole the sole copy of the list of members. Bam! End of organization.
Mailman is a popular list server with a web-based self-service interface for users. It has many fine features, none of which are a way to back up your actual membership list (to say nothing of your archives and config files) from the web interface.
Since the vast majority of Mailman list owners/moderators are apparently customers running their lists on Mailman servers operated by web hosting companies for their customers, the vast majority of Mailman list owners/moderators do not have command-line access to the Mailman install running their list and they have no way to back up their data, save asking their hosting company to do that for them (manually!)...
Or this.
The one thing you can back up is the list of email addresses of a list and the associated personal names, and the one way to do it is through the email interface.
Manually, this is simple enough. Email [$listname]-request@domain.tld with "who $adminpassword" in the body of the message. The list will be emailed back to whatever address you sent it from. Lovely.
What follows is a description of my automated system for firing off such an email every night, using nmh, procmail, and cron.
I keep the configs and resources for my lists in a directory called .mailguests, in a subdirectory with the name of the list, e.g. "mylist".
.mailguests/mylist/backup_procmailrc
.mailguests/mylist/comps_backup
Also, you're going to need an nmh folder somewhere to keep the results.
Okay.
Your procmailrc recipe should look something like:
To test the procmail recipe(s), I like to use:
What else do I have in .mailguests/mylist/backup_procmailrc ? Well, not to get ahead of myself (that would be a separate post), I precede that delivering recipe with:
But we haven't actually gotten any backups out of this thing yet. Onward.
In .mailguests/mylist/comps_backup, you need to draft the email message requesting the list of members from the Mailman list server's email interface. It looks like this:
Also note that the email address doing the asking doesn't have to be a member, if it has the admin password. Oh, Mailman.
Also, note that you're requesting from the backup address you created earlier.
Now to test it. You're going to need to find an obscure part of nmh, post. Often post will not be in your path, and you'll have to call it with an absolute filename. Nevertheless man post should do the right thing. In my system, post is at /usr/lib/post. So I call it on my comps_backup like so:
Once you have that working, you now have a command that you can pop into a crontab. Go figure out how you do that on your system, and do so, and you're all set.
It was destroyed when a disgruntled member/volunteer stole the sole copy of the list of members. Bam! End of organization.
Mailman is a popular list server with a web-based self-service interface for users. It has many fine features, none of which are a way to back up your actual membership list (to say nothing of your archives and config files) from the web interface.
Since the vast majority of Mailman list owners/moderators are apparently customers running their lists on Mailman servers operated by web hosting companies for their customers, the vast majority of Mailman list owners/moderators do not have command-line access to the Mailman install running their list and they have no way to back up their data, save asking their hosting company to do that for them (manually!)...
Or this.
The one thing you can back up is the list of email addresses of a list and the associated personal names, and the one way to do it is through the email interface.
Manually, this is simple enough. Email [$listname]-request@domain.tld with "who $adminpassword" in the body of the message. The list will be emailed back to whatever address you sent it from. Lovely.
What follows is a description of my automated system for firing off such an email every night, using nmh, procmail, and cron.
I keep the configs and resources for my lists in a directory called .mailguests, in a subdirectory with the name of the list, e.g. "mylist".
.mailguests/mylist/backup_procmailrc
.mailguests/mylist/comps_backup
Also, you're going to need an nmh folder somewhere to keep the results.
Okay.
Your procmailrc recipe should look something like:
Can't guarantee that that works, because mine doesn't look like that. Instead, in my main procmailrc, I have::0 *^To:.*mylist\+backup ${HOME}/Mail/mylist/backup/.
Which I can do because I previously defined ORIGTO from the envelope. And in .mailguests/mylist/backup_procmailrc I have, well several other things, but crucially::0 * ORIGTO ?? ^mylist\+backup$ { SWITCHRC="${HOME}/.mailguests/mylist/backup_procmailrc" }
Because I have regular list traffic going into ${HOME}/Mail/t/mylist/, administrative alerts such as subscribes, unsubscribes, and moderated messages going into ${HOME}/Mail/t/mylist/admin, and I didn't want to flood ${HOME}/Mail/t/mylist/admin with nightly backup emails. So they got their own folder.:0 ${HOME}/Mail/t/mylist/admin/backup/.
To test the procmail recipe(s), I like to use:
A few minutes later, you should have an email with the subject "Test 1" in whatever folder you specified (in my case, the magic command is show last +t/mylist/admin/backup). If not, go debug and try again.date | mhmail mylist+backup@domain.tld -from testing@domain.tld -subject "Test 1"
What else do I have in .mailguests/mylist/backup_procmailrc ? Well, not to get ahead of myself (that would be a separate post), I precede that delivering recipe with:
Tada! Now when I (the technical contact) am getting nightly backups, once a week the system emits a backup to the person in charge of the organization whose list it actually is, so that if I get struck by lightning she has the membership list in hand, no more than a week stale, which is what we decided worked for us.DAYOFWEEK=`/bin/date "+%w"` # If today is Friday, cc [NAME OF LISTMOM REDACTED] :0 c * DAYOFWEEK ?? 5 |/usr/sbin/sendmail -G -i -f$ENVFROM listmomsaddress@domain.tld
But we haven't actually gotten any backups out of this thing yet. Onward.
In .mailguests/mylist/comps_backup, you need to draft the email message requesting the list of members from the Mailman list server's email interface. It looks like this:
Replace "listadminpassword" with whatever the admin-level password for your list is. Note, that if you do not use the admin password, you will not get any hidden members. Only the admin password returns the full list.To: mylist-request@domain.tld From: The Backup System <mylist+backup@domain.tld> Subject: Backup -------- who listadminpassword
Also note that the email address doing the asking doesn't have to be a member, if it has the admin password. Oh, Mailman.
Also, note that you're requesting from the backup address you created earlier.
Now to test it. You're going to need to find an obscure part of nmh, post. Often post will not be in your path, and you'll have to call it with an absolute filename. Nevertheless man post should do the right thing. In my system, post is at /usr/lib/post. So I call it on my comps_backup like so:
Do that once, and then in a few minutes, go look at wherever you're filing those incoming messages (again, in my case show last +t/mylist/admin/backup). If you did everything right, you should have your email from the server with a list of list members. If not, stop here and debug until you do./usr/lib/post ~/.mailguests/spagna/comps_backup
Once you have that working, you now have a command that you can pop into a crontab. Go figure out how you do that on your system, and do so, and you're all set.