[sf-lug] @lists.sf-lug.org ... & potentially "moving" list to other domain on same host within Mailman

Michael Paoli Michael.Paoli at cal.berkeley.edu
Sat Oct 21 10:49:23 PDT 2017

[list hopping ... context, context :-) ...
and further background:
et. seq.]

> From: "Rick Moen" <rick at linuxmafia.com>
> Subject: Re: [BALUG-Admin] details, etc. Re: BALUG lists -  
> lists.balug.org is canonical, temp.balug.org also usable to about  
> 2017-11-30
> Date: Thu, 21 Sep 2017 14:46:42 -0700

> Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):
>> $ id
>> uid=38(list) gid=38(list) groups=38(list)
>> $ (umask 027 && withlist -l -r fix_url balug-test -u lists.balug.org)
>> Importing fix_url...
>> Running fix_url.fix_url()...
>> Loading list balug-test (locked)
>> Saving list
>> Finalizing
>> $
> For those playing along at home:
>   linuxmafia:/var/lib/mailman/bin# ./fix_url.py
>   Reset a list's web_page_url attribute to the default setting.
>   This script is intended to be run as a bin/withlist script, i.e.
>   % bin/withlist -l -r fix_url listname [options]
>   Options:
>       -u urlhost
>       --urlhost=urlhost
>           Look up urlhost in the virtual host table and set the  
> web_page_url and
>           host_name attributes of the list to the values found.  This
>           essentially moves the list from one virtual domain to another.
>           Without this option, the default web_page_url and  
> host_name values are
>           used.
>       -v / --verbose
>           Print what the script is doing.
>   If run standalone, it prints this help text and exits.
>   linuxmafia:/var/lib/mailman/bin#
> 'withlist' ($MAILMAN_HOME/bin/withlist) is a 'General framework for
> interacting with a mailing list object.'  It uses Python's interpreter
> to modify Mailman binary objects, either interactively or (as Michael
> did here) programmatically.
> '-l' = lock the mailing list before futzing with it.  (Good idea.)
> '-r' = run the Python script named next on this command line, in this
> case fix_url.py.   (It includes an instruction to unlock the mailing
> list at the end.)
> My instance of withlist doesn't include a '-u' option.  With it, you
> just specify the mailing list as ending parameter.

Ah, dang, bugger not having the -u option.  I wonder if ...
newer version of program that has -u option would be backwards compatible
and not break stuff?  Maybe something someone can - or has - tested
(e.g. on a virtual machine or whatever) ... or ... maybe just easier
:-) ... to wait 'till upgraded and that -u option is available.
It is present on the mailman version 1:2.1.18-2+deb8u1 on what's presently
Debian oldstable.  Not sure at what point/version that option was added.

$ dpkg -S /usr/lib/mailman/bin/fix_url.py /usr/lib/mailman/bin/withlist
mailman: /usr/lib/mailman/bin/fix_url.py
mailman: /usr/lib/mailman/bin/withlist
$ echo $(lsb_release -d; uname -m); dpkg -l mailman |
> awk '{if(($1=="ii")&&($2=="mailman"))print $2,$3;}'
Description: Debian GNU/Linux 8.9 (jessie) x86_64
mailman 1:2.1.18-2+deb8u1

I'm sure one *could* do the inter-host migration method ... for
inter-host migration, ... but that's significantly more
pain/work/complexity to do it that way.  And ... "of course",
sysadmins are "lazy" ... or more properly known as efficient!  :-)
Prefer to accomplish *more*, with less work/effort.  I (and many) call
that efficient.  So, sometimes (actually, a bit surprising often),
the answer is "just wait, then it will be easier" (or moot, or ...).

No request for actions are intended to be implied by ... :-)

> https://pythonhosted.org/mailman/src/mailman/commands/docs/withlist.html
> (Examples are interactive Python, not scripted.)

More information about the sf-lug mailing list