diff -ru mailman-2.1.13.o/Mailman/Gui/General.py mailman-2.1.13/Mailman/Gui/General.py --- mailman-2.1.13.o/Mailman/Gui/General.py 2009-12-22 20:00:43.000000000 +0200 +++ mailman-2.1.13/Mailman/Gui/General.py 2010-06-14 15:02:20.560959734 +0200 @@ -426,7 +426,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 -ru mailman-2.1.13.o/Mailman/MailList.py mailman-2.1.13/Mailman/MailList.py --- mailman-2.1.13.o/Mailman/MailList.py 2009-12-22 20:00:43.000000000 +0200 +++ mailman-2.1.13/Mailman/MailList.py 2010-06-14 15:19:11.630805589 +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): @@ -473,8 +478,6 @@ def Create(self, name, admin, crypted_password, langs=None, emailhost=None): assert name == name.lower(), 'List name must be all lower case.' - if Utils.list_exists(name): - raise Errors.MMListAlreadyExistsError, name # Problems and potential attacks can occur if the list name in the # pipe to the wrapper in an MTA alias or other delivery process # contains shell special characters so allow only defined characters @@ -488,11 +491,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.EmailAddressError: 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 @@ -500,6 +511,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] @@ -1341,7 +1356,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 -ru mailman-2.1.13.o/bin/list_lists mailman-2.1.13/bin/list_lists --- mailman-2.1.13.o/bin/list_lists 2009-12-22 20:00:43.000000000 +0200 +++ mailman-2.1.13/bin/list_lists 2010-06-14 15:22:57.181010502 +0200 @@ -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 -ru mailman-2.1.13.o/bin/mailmanctl mailman-2.1.13/bin/mailmanctl --- mailman-2.1.13.o/bin/mailmanctl 2009-12-22 20:00:43.000000000 +0200 +++ mailman-2.1.13/bin/mailmanctl 2010-06-14 15:24:02.450940928 +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 -ru mailman-2.1.13.o/bin/newlist mailman-2.1.13/bin/newlist --- mailman-2.1.13.o/bin/newlist 2009-12-22 20:00:43.000000000 +0200 +++ mailman-2.1.13/bin/newlist 2010-06-14 16:24:10.351009510 +0200 @@ -157,7 +157,8 @@ if '@' in listname: # note that --urlhost and --emailhost have precedence - listname, domain = listname.split('@', 1) + firstname, domain = listname.split('@', 1) + listname = "%s-%s" % (firstname, domain) urlhost = urlhost or domain emailhost = emailhost or mm_cfg.VIRTUAL_HOSTS.get(domain, domain)