Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

BooK (2612)

BooK
  {book} {at} {cpan.org}
http://paris.mongueurs.net/
Yahoo! ID: philippe_bruhat (Add User, Send Message)

Obfuscation [plover.com]. Pink [axis-of-aevil.net]. HTTP::Proxy [cpan.org]. YEF [yapceurope.org]. Fishnet [perl.org]. Kapow [cpan.org]. Cog's [perl.org] bitch [cpan.org]. Invitation [perl.org]. White [perl.org] Camel [perl.org]. Nuff' said.

Journal of BooK (2612)

Wednesday October 14, 2009
02:00 AM

Mail::Box++

[ #39750 ]

So sferics' disk died and took everything that wasn't backed up with it. It turns out that one of the important configuration items that weren't backed up were the configurations and subcribers lists of the Mailman mailing-lists.

To get the subscribers lists back, we didn't have many options:

  • Resubscribe all posters, which would also subscribe the ones who did unsubscribe at some point, and kick out all the lurkers... Not so good.
  • Process all the administrative messages to get a chronological list of subscribe/unsubscribe action, and rebuild the list from there.
  • Seed the list with the list of posters, if possible the subscribed ones (i.e. not the one whose mails were passed through moderation)

We use Mailman for managing our mailing-lists. It works well enough for us, but it has its share of hate:

  • Localized admin messages are nice, but a X-Mailman-Action header would be nicer, so we would have to process the body of each actions, in all languages we might have used

Luckily, it also has a few helpful headers:

  • List-Id, so we can process a folder full of admin messages and know about which list each message is about
  • X-Mailman-Approved-At, so we can detect messages sent by non-subscribed posters

I used Mail::Box to create two scripts to process the messages (in French and English, so anyone who subscribed in German is out of luck) and provide some useful info (the people with the archives and the admin-fu did the actual work of fixing the lists).

Sure, Mail::Box is slow, and the interface is a bit complicated, but on the other hand it is well documented, and it's correct.

Summary at the end of the day^Wlong week-end:

  • (incomplete backups)--
  • Mailman-- # misses useful headers that would have made the job easier
  • Mail::Box++ # gets the job done in 20 lines
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.