| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 |
- Index: Mailman/Archiver/pipermail.py
- --- Mailman/Archiver/pipermail.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/Archiver/pipermail.py 2008-04-22 07:51:36 +0200
- @@ -122,9 +122,9 @@
- parentID = article.parentID
- if parentID is not None and self.articleIndex.has_key(parentID):
- parent = self.getArticle(archive, parentID)
- - myThreadKey = parent.threadKey + article.date + '-'
- + myThreadKey = parent.threadKey + article.date + '/' + article.msgid + '-'
- else:
- - myThreadKey = article.date + '-'
- + myThreadKey = article.date + '/' + article.msgid + '-'
- article.threadKey = myThreadKey
- key = myThreadKey, article.msgid
- self.setThreadKey(archive, key, article.msgid)
- @@ -418,7 +418,7 @@
- else:
- parent = self.database.getArticle(self.archive,
- article.parentID)
- - article.threadKey = parent.threadKey+article.date+'-'
- + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-'
- self.database.setThreadKey(self.archive,
- (article.threadKey, article.msgid),
- msgid)
- @@ -632,9 +632,9 @@
- article.parentID = parentID = self.get_parent_info(arch, article)
- if parentID:
- parent = self.database.getArticle(arch, parentID)
- - article.threadKey = parent.threadKey + article.date + '-'
- + article.threadKey = parent.threadKey + article.date + '/' + article.msgid + '-'
- else:
- - article.threadKey = article.date + '-'
- + article.threadKey = article.date + '/' + article.msgid + '-'
- key = article.threadKey, article.msgid
-
- self.database.setThreadKey(arch, key, article.msgid)
- Index: Mailman/Commands/cmd_subscribe.py
- --- Mailman/Commands/cmd_subscribe.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/Commands/cmd_subscribe.py 2008-04-22 07:51:36 +0200
- @@ -83,6 +83,7 @@
- if password is None:
- password = Utils.MakeRandomPassword()
- if address is None:
- + h = None
- realname, address = parseaddr(res.msg['from'])
- if not address:
- # Fall back to the sender address
- Index: Mailman/HTMLFormatter.py
- --- Mailman/HTMLFormatter.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/HTMLFormatter.py 2008-04-22 07:51:36 +0200
- @@ -44,7 +44,7 @@
- realname = self.real_name
- hostname = self.host_name
- listinfo_link = Link(self.GetScriptURL('listinfo'), realname).Format()
- - owner_link = Link('mailto:' + self.GetOwnerEmail(), ownertext).Format()
- + owner_link = Link('mailto:' + self.GetOwnerEmail(), realname + '-owner').Format()
- innertext = _('%(listinfo_link)s list run by %(owner_link)s')
- return Container(
- '<hr>',
- Index: Mailman/Handlers/Decorate.py
- --- Mailman/Handlers/Decorate.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/Handlers/Decorate.py 2008-04-22 07:51:36 +0200
- @@ -191,6 +191,7 @@
- del msg['content-transfer-encoding']
- del msg['content-disposition']
- msg['Content-Type'] = 'multipart/mixed'
- + msg['Mime-version'] = '1.0'
-
-
-
- Index: Mailman/Handlers/Scrubber.py
- --- Mailman/Handlers/Scrubber.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/Handlers/Scrubber.py 2008-04-22 07:51:36 +0200
- @@ -385,6 +385,8 @@
- t = unicode(t, 'ascii', 'replace')
- try:
- # Should use HTML-Escape, or try generalizing to UTF-8
- + if len(charset) == 0:
- + charset = 'us-ascii'
- t = t.encode(charset, 'replace')
- except (UnicodeError, LookupError, ValueError,
- AssertionError):
- Index: Mailman/Queue/OutgoingRunner.py
- --- Mailman/Queue/OutgoingRunner.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/Queue/OutgoingRunner.py 2008-04-22 07:51:36 +0200
- @@ -89,6 +89,7 @@
- syslog('error', 'Cannot connect to SMTP server %s on port %s',
- mm_cfg.SMTPHOST, port)
- self.__logged = True
- + self._snooze(0)
- return True
- except Errors.SomeRecipientsFailed, e:
- # Handle local rejects of probe messages differently.
- Index: Mailman/htmlformat.py
- --- Mailman/htmlformat.py.orig 2008-04-21 20:28:22 +0200
- +++ Mailman/htmlformat.py 2008-04-22 07:51:36 +0200
- @@ -300,7 +300,8 @@
- charset = 'us-ascii'
- if self.language:
- charset = Utils.GetCharSet(self.language)
- - output = ['Content-Type: text/html; charset=%s\n' % charset]
- + output = ['Content-Type: text/html; charset=%s' % charset]
- + output.append('Cache-control: no-cache\n')
- if not self.suppress_head:
- kws.setdefault('bgcolor', self.bgcolor)
- tab = ' ' * indent
- Index: bin/check_perms
- --- bin/check_perms.orig 2008-04-21 20:28:22 +0200
- +++ bin/check_perms 2008-04-22 07:51:36 +0200
- @@ -82,7 +82,7 @@
- return os.stat(path)[ST_MODE]
-
- def statgidmode(path):
- - stat = os.stat(path)
- + stat = os.lstat(path)
- return stat[ST_MODE], stat[ST_GID]
-
- seen = {}
- Index: bin/config_list
- --- bin/config_list.orig 2008-04-21 20:28:22 +0200
- +++ bin/config_list 2008-04-22 07:51:36 +0200
- @@ -307,6 +307,11 @@
- in mm_cfg.OPTINFO.items()
- if validval & bitval]
- gui._setValue(mlist, k, validval, fakedoc)
- + # Ugly hack, but seems to be needed since
- + # new_member_options isn't really a number in gui.
- + # -- tfheen, 2003-12-06
- + if k == "new_member_options":
- + mlist.new_member_options = validval
- # BAW: when to do gui._postValidate()???
- finally:
- if savelist and not checkonly:
- Index: bin/mailmanctl
- --- bin/mailmanctl.orig 2008-04-21 20:28:22 +0200
- +++ bin/mailmanctl 2008-04-22 07:51:36 +0200
- @@ -417,6 +417,13 @@
- # won't be opening any terminal devices, don't do the ultra-paranoid
- # suggestion of doing a second fork after the setsid() call.
- os.setsid()
- +
- + # Be sure to close any open std{in,out,err}
- + devnull = os.open('/dev/null', 0)
- + os.dup2(devnull, 0)
- + os.dup2(devnull, 1)
- + os.dup2(devnull, 2)
- +
- # Instead of cd'ing to root, cd to the Mailman installation home
- os.chdir(mm_cfg.PREFIX)
- # Set our file mode creation umask
- Index: bin/newlist
- --- bin/newlist.orig 2008-04-21 20:28:22 +0200
- +++ bin/newlist 2008-04-22 07:51:36 +0200
- @@ -87,6 +87,9 @@
- defined in your Defaults.py file or overridden by settings in mm_cfg.py).
-
- Note that listnames are forced to lowercase.
- +
- +The list admin address need to be a fully-qualified address, like
- +owner@example.com, not just owner.
- """
-
- import sys
- @@ -94,6 +97,7 @@
- import getpass
- import getopt
- import sha
- +import grp
-
- import paths
- from Mailman import mm_cfg
- @@ -122,6 +126,9 @@
-
-
- def main():
- + gid = grp.getgrnam(mm_cfg.MAILMAN_GROUP)[2]
- + if os.getgid() != mm_cfg.MAILMAN_GROUP:
- + os.setgid(gid)
- try:
- opts, args = getopt.getopt(sys.argv[1:], 'hql:u:e:',
- ['help', 'quiet', 'language=',
- @@ -203,7 +210,7 @@
- except Errors.BadListNameError, s:
- usage(1, _('Illegal list name: %(s)s'))
- except Errors.EmailAddressError, s:
- - usage(1, _('Bad owner email address: %(s)s'))
- + usage(1, _('Bad owner email address: %(s)s. Owner addresses need to be fully-qualified names, like "owner@example.com", not just "owner".'))
- except Errors.MMListAlreadyExistsError:
- usage(1, _('List already exists: %(listname)s'))
-
- Index: bin/update
- --- bin/update.orig 2008-04-21 20:28:22 +0200
- +++ bin/update 2008-04-22 07:51:36 +0200
- @@ -541,9 +541,11 @@
- file20 = os.path.join(mm_cfg.DATA_DIR, 'pending_subscriptions.db')
- file214 = os.path.join(mm_cfg.DATA_DIR, 'pending.pck')
- db = None
- + ver = None
- # Try to load the Mailman 2.0 file
- try:
- fp = open(file20)
- + ver = "20"
- except IOError, e:
- if e.errno <> errno.ENOENT: raise
- else:
- @@ -555,6 +557,7 @@
- # Try to load the Mailman 2.1.x where x < 5, file
- try:
- fp = open(file214)
- + ver = "214"
- except IOError, e:
- if e.errno <> errno.ENOENT: raise
- else:
- @@ -588,8 +591,12 @@
- # data[0] is the address being unsubscribed
- addrops_by_address.setdefault(data[0], []).append((key, val))
- elif op == Pending.SUBSCRIPTION:
- - # data[0] is a UserDesc object
- - addr = data[0].address
- + if ver == "20":
- + # data is tuple (emailaddr, password, digest)
- + addr = data[0]
- + else:
- + # data[0] is a UserDesc object
- + addr = data[0].address
- subs_by_address.setdefault(addr, []).append((key, val))
- elif op == Pending.RE_ENABLE:
- # data[0] is the mailing list's internal name
- Index: messages/de/LC_MESSAGES/mailman.po
- --- messages/de/LC_MESSAGES/mailman.po.orig 2008-04-21 20:28:22 +0200
- +++ messages/de/LC_MESSAGES/mailman.po 2008-04-22 07:53:15 +0200
- @@ -7350,7 +7350,7 @@
- "\">topics_bodylines_limit</a>\n"
- " configuration variable."
- msgstr ""
- -"Der Themenfilter kategorisiert jede eingehende e-Mailnachricht gemäss < a "
- +"Der Themenfilter kategorisiert jede eingehende e-Mailnachricht gemäss <a "
- "href=\"http://www.python.org/doc/current/lib/module-re.html\">Filterregeln "
- "mit regulären Ausdrücken</a>, die Sie weiter unten festlegen können. Wenn "
- "die <code>Subject:</code> oder <code>Keywords:</code> Header der Nachricht "
- @@ -7363,7 +7363,7 @@
- "nicht mit Sammelnachrichten.\n"
- " <p>Optional kann auch der Nachrichtentext auf Vorkommen von <code>Subject:</"
- "code> und <code>Keyword:</code> Header durchsucht werden. Spezifizieren Sie "
- -"hierzu die Option<a href=\"?VARHELP=topics/topics_bodylines_limit"
- +"hierzu die Option <a href=\"?VARHELP=topics/topics_bodylines_limit"
- "\">topics_bodylines_limit</a>."
-
- # Mailman/Gui/Topics.py:57
- Index: messages/es/LC_MESSAGES/mailman.po
- --- messages/es/LC_MESSAGES/mailman.po.orig 2008-04-21 20:28:22 +0200
- +++ messages/es/LC_MESSAGES/mailman.po 2008-04-22 07:51:36 +0200
- @@ -2002,7 +2002,7 @@
-
- #: Mailman/Cgi/create.py:212 bin/newlist:204
- msgid "Illegal list name: %(s)s"
- -msgstr "Nombre de lista ilegal: %(opt)s"
- +msgstr "Nombre de lista ilegal: %(s)s"
-
- #: Mailman/Cgi/create.py:217
- msgid ""
- Index: scripts/driver
- --- scripts/driver.orig 2008-04-21 20:28:22 +0200
- +++ scripts/driver 2008-04-22 07:51:36 +0200
- @@ -95,6 +95,15 @@
- module = getattr(pkg, scriptname)
- main = getattr(module, 'main')
- try:
- + import os
- + request_method = os.environ.get('REQUEST_METHOD')
- + if not request_method in ['GET', 'POST', 'HEAD']:
- + print "Status: 405 Method not allowed"
- + print "Content-type: text/plain"
- + print
- + print "The method is not allowed"
- + sys.exit()
- +
- try:
- sys.stderr = logger
- sys.stdout = tempstdout
|