[Pkg-mailman-hackers] Bug#440162: newlist: emailhost should default to urlhost if specified
martin f krafft
madduck at debian.org
Thu Aug 30 10:44:41 UTC 2007
Package: mailman
Version: 2.1.9-7
Severity: wishlist
Tags: patch
When I call newlist, emailhost is set to mm_cfg.DEFAULT_EMAIL_HOST,
unless --urlhost is specified and maps to a value in the
VIRTUAL_HOSTS map.
From all I can tell, this behaviour doesn't really make sense. If
--urlhost is specified and the key is not found in VIRTUAL_HOSTS,
then it should default to urlhost, not to mm_cfg.DEFAULT_EMAIL_HOST.
Here is what I think should happen, given defaults of lists.bar.com for
urlhost/emailhost; this is newlist just printing urlhost, emailhost:
$ newlist -q list1 admin at lists.bar.com password
lists.bar.com lists.bar.com
$ newlist -q -u baz.bar.com list1 admin at lists.bar.com password
baz.bar.com baz.bar.com
$ newlist -q -u baz.bar.com -e mail.bar.com list1 admin at lists.bar.com password
baz.bar.com mail.bar.com
$ newlist -q -e mail.bar.com list1 admin at lists.bar.com password
lists.bar.com mail.bar.com
$ newlist -q list1 at lists.bar.com admin at lists.bar.com password
baz.bar.com baz.bar.com
$ sudo newlist -q list1 at lists.bar.com admin at lists.bar.com password
lists.bar.com lists.bar.com
$ sudo newlist -q list1 at baz.bar.com admin at lists.bar.com password
baz.bar.com baz.bar.com
Now, with add_virtualhost('www.foo.bar.com', 'foo.bar.com'):
$ sudo newlist -q list1 at www.foo.bar.com admin at lists.bar.com password
www.foo.bar.com foo.bar.com
$ sudo newlist -q -u www.bar.com list1 at www.foo.bar.com admin at lists.bar.com password
www.bar.com foo.bar.com
$ sudo newlist -q -e mail.bar.com list1 at www.foo.bar.com admin at lists.bar.com password
www.foo.bar.com mail.bar.com
$ sudo newlist -q -u www.bar.com -e mail.bar.com list1 at www.foo.bar.com admin at lists.bar.com password
www.bar.com mail.bar.com
PS: I think instead of urlhost mapping to emailhost, it should be
exactly the other way around; mailman is primarily a mail list
manager, not a web interface after all.
Here's the patch:
--- /tmp/newlist 2007-08-30 12:44:25.867885279 +0200
+++ /usr/sbin/newlist 2007-08-30 12:43:45.563486360 +0200
@@ -170,7 +170,8 @@
urlhost = urlhost or mm_cfg.DEFAULT_URL_HOST
host_name = emailhost or \
- mm_cfg.VIRTUAL_HOSTS.get(urlhost, mm_cfg.DEFAULT_EMAIL_HOST)
+ mm_cfg.VIRTUAL_HOSTS.get(urlhost, urlhost)
+ emailhost = host_name
web_page_url = mm_cfg.DEFAULT_URL_PATTERN % urlhost
if Utils.list_exists(listname):
--
.''`. martin f. krafft <madduck at debian.org>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature (see http://martin-krafft.net/gpg/)
Url : http://lists.alioth.debian.org/pipermail/pkg-mailman-hackers/attachments/20070830/c0cabf39/attachment-0001.pgp
More information about the Pkg-mailman-hackers
mailing list