Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

paulm (5067)

paulm
  (email not shown publicly)
http://paulm.com/
Jabber: Tantrix@jabber.org

Hello! I'm Paul Makepeace [paulm.com], a regular on London.pm [pm.org]. Perl's my primary language I code in (since '95 I think); people even pay me [paulmakepeace.com] for it! Although I'd say I'm a developer I spend a substantial chunk of time being a sysadmin for my own machines (I'm also one of london.pm.org's root), all Debian boxen.

This journal is my first foray into a technical annotation of my perl life...

Journal of paulm (5067)

Thursday October 14, 2004
05:01 AM

Mailman fix_url.py wrapper

[ #21337 ]
Mailman has this concept of a URL that's associated with a domain. Unfortunately it's not possible to configure it through the interface, which on vhosted lists is really annoying. There is an impossible-to-remember incantation with an auxilliary script. Tired of looking this up and messing up the invocation here's a wrapper. Yeah, it's in perl.

#!/usr/bin/perl

use strict;
use warnings;

# paulm, 2004-10-14
# Provide a pleasant interface to mailman's fix_url.py script
# http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq04.029.htp

my ($program) = $0 =~ m~.*/(.+)$~;
sub usage { die "$program: $program list\@example.com\n@_.\n" }
usage("Missing list address")
        unless @ARGV == 1;
my ($local_part, $domain) = split '@', $ARGV[0];
usage ("Couldn't parse $ARGV[0] into a list address")
        unless $local_part and $domain;
print "Fixing ${local_part}\@$domain...\n";
system qq{/usr/lib/mailman/bin/withlist -l -r fix_url $local_part -u $domain};

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.