Debian Bug report logs - #440162
newlist: emailhost should default to urlhost if specified

version graph

Package: mailman; Maintainer for mailman is Mailman for Debian <[email protected]>; Source for mailman is src:mailman (PTS, buildd, popcon).

Reported by: martin f krafft <[email protected]>

Date: Thu, 30 Aug 2007 10:48:01 UTC

Severity: wishlist

Tags: patch

Found in version 2.1.9-7

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Mailman for Debian <[email protected]>:
Bug#440162; Package mailman. (full text, mbox, link).


Message #3 received at [email protected] (full text, mbox, reply):

From: martin f krafft <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: newlist: emailhost should default to urlhost if specified
Date: Thu, 30 Aug 2007 12:44:41 +0200
[Message part 1 (text/plain, inline)]
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
[digital_signature_gpg.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Thu May 15 19:15:27 2025; Machine Name: buxtehude

Debian Bug tracking system

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/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.