Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 151714 Details for
Bug 208789
net-mail/mailman update
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mailman-2.1.10-vhosts.patch
mailman-2.1.10-vhosts.patch (text/plain), 6.59 KB, created by
Jaco Kroon
on 2008-05-03 17:15:37 UTC
(
hide
)
Description:
mailman-2.1.10-vhosts.patch
Filename:
MIME Type:
Creator:
Jaco Kroon
Created:
2008-05-03 17:15:37 UTC
Size:
6.59 KB
patch
obsolete
>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(_("""<b>real_name</b> 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): >@@ -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 > # 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. >@@ -482,11 +485,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 >@@ -494,6 +505,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] >@@ -1335,7 +1350,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) > >@@ -197,7 +197,7 @@ > langs = [lang] > else: > langs = [lang, mm_cfg.DEFAULT_SERVER_LANGUAGE] >- mlist.Create(listname, owner_mail, pw, langs=langs) >+ mlist.Create(listname, owner_mail, pw, langs=langs, emailhost=emailhost) > finally: > os.umask(oldmask) > except Errors.BadListNameError, s:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208789
:
142602
|
142603
|
142604
|
142606
|
142607
|
142608
|
142634
|
142635
|
142925
|
142927
|
142929
|
142931
|
142977
|
142979
|
142980
|
145019
|
145021
|
151713
| 151714 |
151715