diff -rau mailman-2.1.9-orig/Mailman/Gui/General.py mailman-2.1.9/Mailman/Gui/General.py --- mailman-2.1.9-orig/Mailman/Gui/General.py 2006-08-30 16:54:22.000000000 +0200 +++ mailman-2.1.9/Mailman/Gui/General.py 2008-02-03 13:30:33.000000000 +0200 @@ -420,7 +420,7 @@ def _setValue(self, mlist, property, val, doc): if property == 'real_name' and \ - val.lower() <> mlist.internal_name().lower(): + val.lower() <> mlist.real_name.lower(): # These values can't differ by other than case doc.addError(_("""real_name attribute not changed! It must differ from the list's name by case diff -rau mailman-2.1.9-orig/Mailman/MailList.py mailman-2.1.9/Mailman/MailList.py --- mailman-2.1.9-orig/Mailman/MailList.py 2006-03-12 04:24:53.000000000 +0200 +++ mailman-2.1.9/Mailman/MailList.py 2008-02-03 08:51:55.000000000 +0200 @@ -185,9 +185,14 @@ return self._full_path def getListAddress(self, extra=None): + posting_addr = self.internal_name() + try: + posting_addr = self.real_name + except: + pass if extra is None: - return '%s@%s' % (self.internal_name(), self.host_name) - return '%s-%s@%s' % (self.internal_name(), extra, self.host_name) + return '%s@%s' % (posting_addr, self.host_name) + return '%s-%s@%s' % (posting_addr, extra, self.host_name) # For backwards compatibility def GetBouncesEmail(self): @@ -470,8 +475,6 @@ # def Create(self, name, admin, crypted_password, langs=None, emailhost=None): - if Utils.list_exists(name): - raise Errors.MMListAlreadyExistsError, name # Validate what will be the list's posting address. If that's # invalid, we don't want to create the mailing list. The hostname # part doesn't really matter, since that better already be valid. @@ -479,11 +482,19 @@ # the admin's email address, so transform the exception. if emailhost is None: emailhost = mm_cfg.DEFAULT_EMAIL_HOST - postingaddr = '%s@%s' % (name, emailhost) + firstname = name + if '@' in name: + firstname, emailhost = name.split('@', 1) + # Keep posting address sane. + postingaddr = '%s@%s' % (firstname, emailhost) + name = '%s-%s' % (firstname, emailhost) try: Utils.ValidateEmail(postingaddr) except Errors.MMBadEmailError: raise Errors.BadListNameError, postingaddr + # Refuse to create lists that already exists + if Utils.list_exists(name): + raise Errors.MMListAlreadyExistsError, name # Validate the admin's email address Utils.ValidateEmail(admin) self._internal_name = name @@ -491,6 +502,10 @@ # Don't use Lock() since that tries to load the non-existant config.pck self.__lock.lock() self.InitVars(name, admin, crypted_password) + # This is for getListAddress + self.list_address = postingaddr + self.real_name = firstname + self.subject_prefix = mm_cfg.DEFAULT_SUBJECT_PREFIX % self.__dict__ self.CheckValues() if langs is None: self.available_languages = [self.preferred_language] @@ -1322,7 +1337,7 @@ addresses in the recipient headers. """ # This is the list's full address. - listfullname = '%s@%s' % (self.internal_name(), self.host_name) + listfullname = self.getListAddress() recips = [] # Check all recipient addresses against the list's explicit addresses, # specifically To: Cc: and Resent-to: diff -rau mailman-2.1.9-orig/Mailman/Utils.py mailman-2.1.9/Mailman/Utils.py --- mailman-2.1.9-orig/Mailman/Utils.py 2006-08-30 16:54:22.000000000 +0200 +++ mailman-2.1.9/Mailman/Utils.py 2008-02-03 11:58:38.000000000 +0200 @@ -215,7 +215,7 @@ # This means local, unqualified addresses, are no allowed if not domain_parts: raise Errors.MMBadEmailError, s - if len(domain_parts) < 2: + if len(domain_parts) < 2 and domain_parts[0] != 'localhost': raise Errors.MMBadEmailError, s diff -rau mailman-2.1.9-orig/bin/list_lists mailman-2.1.9/bin/list_lists --- mailman-2.1.9-orig/bin/list_lists 2005-08-27 03:40:17.000000000 +0200 +++ mailman-2.1.9/bin/list_lists 2008-02-08 07:08:19.000000000 +0200 @@ -1,4 +1,4 @@ -#! @PYTHON@ +#! /usr/bin/python # # Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. # @@ -99,7 +99,7 @@ mlist.web_page_url.find(vhost) == -1: continue mlists.append(mlist) - longest = max(len(mlist.real_name), longest) + longest = max(len(mlist.internal_name()), longest) if not mlists and not bare: print _('No matching mailing lists found') @@ -114,7 +114,7 @@ print mlist.internal_name() else: description = mlist.description or _('[no description available]') - print ' ', format % (mlist.real_name, description) + print ' ', format % (mlist.internal_name(), description) diff -rau mailman-2.1.9-orig/bin/mailmanctl mailman-2.1.9/bin/mailmanctl --- mailman-2.1.9-orig/bin/mailmanctl 2006-02-05 06:45:09.000000000 +0200 +++ mailman-2.1.9/bin/mailmanctl 2008-02-08 07:09:53.000000000 +0200 @@ -273,6 +273,8 @@ def check_for_site_list(): sitelistname = mm_cfg.MAILMAN_SITE_LIST + if not '@' in sitelistname: + sitelistname = '%s-%s' % (sitelistname, mm_cfg.DEFAULT_EMAIL_HOST) try: sitelist = MailList(sitelistname, lock=0) except Errors.MMUnknownListError: diff -rau mailman-2.1.9-orig/bin/newlist mailman-2.1.9/bin/newlist --- mailman-2.1.9-orig/bin/newlist 2005-08-27 03:40:17.000000000 +0200 +++ mailman-2.1.9/bin/newlist 2008-02-03 11:35:03.000000000 +0200 @@ -157,7 +157,7 @@ if '@' in listname: # note that --urlhost and --emailhost have precedence - listname, domain = listname.split('@', 1) + firstname, domain = listname.split('@', 1) urlhost = urlhost or domain emailhost = emailhost or mm_cfg.VIRTUAL_HOSTS.get(domain, domain) @@ -193,7 +193,7 @@ oldmask = os.umask(002) try: try: - mlist.Create(listname, owner_mail, pw) + mlist.Create(listname, owner_mail, pw, emailhost=emailhost) finally: os.umask(oldmask) except Errors.BadListNameError, s: