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 [email protected] password
lists.bar.com lists.bar.com
$ newlist -q -u baz.bar.com list1 [email protected] password
baz.bar.com baz.bar.com
$ newlist -q -u baz.bar.com -e mail.bar.com list1 [email protected] password
baz.bar.com mail.bar.com
$ newlist -q -e mail.bar.com list1 [email protected] password
lists.bar.com mail.bar.com
$ newlist -q [email protected][email protected] password
baz.bar.com baz.bar.com
$ sudo newlist -q [email protected][email protected] password
lists.bar.com lists.bar.com
$ sudo newlist -q [email protected][email protected] password
baz.bar.com baz.bar.com
Now, with add_virtualhost('www.foo.bar.com', 'foo.bar.com'):
$ sudo newlist -q [email protected][email protected] password
www.foo.bar.com foo.bar.com
$ sudo newlist -q -u www.bar.com [email protected][email protected] password
www.bar.com foo.bar.com
$ sudo newlist -q -e mail.bar.com [email protected][email protected] password
www.foo.bar.com mail.bar.com
$ sudo newlist -q -u www.bar.com -e mail.bar.com [email protected][email protected] 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 <[email protected]>
: :' : 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
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.