--- ./Mailman/Queue/Switchboard.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Queue/Switchboard.py 2016-04-29 15:23:06.176820000 -0700 @@ -161,7 +161,8 @@ data = cPickle.load(fp) finally: fp.close() - if data.get('_parsemsg'): + #if data.get('_parsemsg'): + if isinstance(msg, str): msg = email.message_from_string(msg, Message.Message) return msg, data --- ./Mailman/Archiver/Archiver.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Archiver/Archiver.py 2016-04-29 15:23:06.177096000 -0700 @@ -135,6 +135,10 @@ return os.path.join(self.archive_dir() + '.mbox', self.internal_name() + '.mbox') + def OldArchiveFileName(self): + """The mbox name where messages are left for archive construction.""" + return os.path.join('/home/mail/archive', self.internal_name()) + def GetBaseArchiveURL(self): url = self.GetScriptURL('private', absolute=1) + '/' if self.archive_private: @@ -146,7 +150,7 @@ 'listname': self.internal_name(), 'hostname': hostname } - if not url.endswith('/'): + if not url.endswith('.html') and not url.endswith('/'): url += '/' return url @@ -173,6 +177,21 @@ syslog('error', 'Archive file access failure:\n\t%s %s', afn, msg) raise + # + # old ArchiveMail function, retained under a new name + # for optional archiving to an mbox + # + def __archive_to_oldmbox(self, post): + """Retain a text copy of the message in an mbox file.""" + try: + afn = self.OldArchiveFileName() + mbox = self.__archive_file(afn) + mbox.AppendMessage(post) + mbox.fp.close() + except IOError, msg: + syslog('error', 'Archive file access failure:\n\t%s %s', afn, msg) + raise + def ExternalArchive(self, ar, txt): d = SafeDict({'listname': self.internal_name(), 'hostname': self.host_name, @@ -198,6 +217,7 @@ # itself must be locked. if mm_cfg.ARCHIVE_TO_MBOX in (1, 2): self.__archive_to_mbox(msg) + self.__archive_to_oldmbox(msg) if mm_cfg.ARCHIVE_TO_MBOX == 1: # Archive to mbox only. return --- ./Mailman/Archiver/pipermail.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Archiver/pipermail.py 2016-04-29 15:25:24.582029000 -0700 @@ -236,6 +236,8 @@ return None date = parsedate_tz(datestr) try: + if date[9] == None: + date[9] = 0 date = mktime_tz(date) if (date < 0 or date - time.time() > @@ -245,9 +247,9 @@ return date except (TypeError, ValueError, OverflowError): return None - date = floatdate(message.get('date')) + date = floatdate(message.get('x-list-received-date')) if date is None: - date = floatdate(message.get('x-list-received-date')) + date = floatdate(message.get('date')) if date is None: date = floatdate(re.sub(r'^.*;\s*', '', message.get('received', ''), flags=re.S)) --- ./Mailman/Bouncer.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Bouncer.py 2016-04-29 15:23:06.177926000 -0700 @@ -159,9 +159,9 @@ elif info.date == day: # We've already scored any bounces for this day, so ignore it. first_today = False - syslog('bounce', '%s: %s already scored a bounce for date %s', + syslog('bounce', '%s: %s already scored a bounce for date %s (score %d)', self.internal_name(), member, - time.strftime('%d-%b-%Y', day + (0,0,0,0,1,0))) + time.strftime('%d-%b-%Y', day + (0,0,0,0,1,0)), info.score) # Continue to check phase below else: # See if this member's bounce information is stale. --- ./Mailman/Bouncers/Microsoft.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Bouncers/Microsoft.py 2016-04-29 15:23:06.178118000 -0700 @@ -49,5 +49,5 @@ state = 1 if state == 1: if '@' in line: - addrs.append(line) + addrs.append(line.strip()) return addrs --- ./Mailman/Handlers/Decorate.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Handlers/Decorate.py 2016-04-29 15:23:06.178350000 -0700 @@ -138,6 +138,9 @@ wrap = False except (LookupError, UnicodeError): pass + elif msg.get_content_type() == 'multipart/signed': + # signed, hands off. + return elif msg.get_content_type() == 'multipart/mixed': # The next easiest thing to do is just prepend the header and append # the footer as additional subparts --- ./Mailman/Handlers/SMTPDirect.py 2016-04-29 15:21:42.160210000 -0700 +++ ./Mailman/Handlers/SMTPDirect.py 2016-04-29 15:23:06.178648000 -0700 @@ -375,7 +375,7 @@ msg['Errors-To'] = envsender if mlist.include_sender_header: del msg['sender'] - msg['Sender'] = '"%s" <%s>' % (mlist.real_name, envsender) + msg['Sender'] = envsender mailopts=[] if msgdata.get('verp') and mm_cfg.VERP_STYLE == 'Postfix': mailopts.append('XVERP=' + mm_cfg.POSTFIX_XVERP_OPTS) --- ./Mailman/Handlers/Scrubber.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Handlers/Scrubber.py 2016-04-29 15:23:06.178945000 -0700 @@ -103,16 +103,16 @@ # archives/private//attachments/YYYYMMDD// # Start by calculating the date-based and msgid-hash components. fmt = '%Y%m%d' - datestr = msg.get('Date') + datestr = msgdata.get('X-List-Received-Date') if datestr: - now = parsedate(datestr) + datedir = safe_strftime(fmt, datestr) else: - now = time.gmtime(msgdata.get('received_time', time.time())) - datedir = safe_strftime(fmt, now) - if not datedir: - datestr = msgdata.get('X-List-Received-Date') + datestr = msg.get('Date') if datestr: - datedir = safe_strftime(fmt, datestr) + now = parsedate(datestr) + else: + now = time.gmtime(msgdata.get('received_time', time.time())) + datedir = safe_strftime(fmt, now) if not datedir: # What next? Unixfrom, I guess. parts = msg.get_unixfrom().split() --- ./Mailman/MTA/Utils.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/MTA/Utils.py 2016-04-29 15:23:06.179144000 -0700 @@ -19,6 +19,7 @@ import os import re import pwd +import re from Mailman import mm_cfg @@ -53,10 +54,14 @@ # Seed this with the special cases. aliases = [(listname, '"|%s post %s"' % (wrapper, safename)), ] + aliases.append(('owner-%s' % listname, '"|%s bounces %s"' % (wrapper, safename))) for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner', 'request', 'subscribe', 'unsubscribe'): aliases.append(('%s-%s' % (listname, ext), '"|%s %s %s"' % (wrapper, ext, safename))) + shortname = re.sub('^freebsd-', '', listname.lower()) + if not shortname == listname: + aliases.append((re.sub('^freebsd-', '', listname.lower()), listname)) return aliases --- ./Mailman/MailList.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/MailList.py 2016-04-29 15:23:06.179829000 -0700 @@ -188,6 +188,8 @@ def getListAddress(self, extra=None): if extra is None: return '%s@%s' % (self.internal_name(), self.host_name) + if extra == 'bounces': + return 'owner-%s@%s' % (self.internal_name(), self.host_name) return '%s-%s@%s' % (self.internal_name(), extra, self.host_name) # For backwards compatibility @@ -350,8 +352,7 @@ self.header_filter_rules = [] self.from_is_list = mm_cfg.DEFAULT_FROM_IS_LIST self.anonymous_list = mm_cfg.DEFAULT_ANONYMOUS_LIST - internalname = self.internal_name() - self.real_name = internalname[0].upper() + internalname[1:] + self.real_name = self.internal_name() self.description = '' self.info = '' self.welcome_msg = '' @@ -1425,6 +1426,7 @@ """ # This is the list's full address. listfullname = '%s@%s' % (self.internal_name(), self.host_name) + shortname = re.sub('^freebsd-', '', listfullname.lower()) recips = [] # Check all recipient addresses against the list's explicit addresses, # specifically To: Cc: and Resent-to: @@ -1441,7 +1443,8 @@ if (# TBD: backwards compatibility: deprecated localpart == self.internal_name() or # exact match against the complete list address - addr == listfullname): + addr == listfullname or + addr == shortname): return True recips.append((addr, localpart)) # Helper function used to match a pattern against an address. --- ./Mailman/Queue/BounceRunner.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Queue/BounceRunner.py 2016-04-29 15:23:06.180110000 -0700 @@ -259,7 +259,7 @@ '%s: bounce message w/no discernable addresses: %s', mlist.internal_name(), msg.get('message-id', 'n/a')) - maybe_forward(mlist, msg) + #maybe_forward(mlist, msg) return # BAW: It's possible that there are None's in the list of addresses, # although I'm unsure how that could happen. Possibly ScanMessages() --- ./Mailman/Utils.py 2016-04-17 11:52:38.000000000 -0700 +++ ./Mailman/Utils.py 2016-04-29 15:23:06.180576000 -0700 @@ -763,9 +763,7 @@ else: # See the note in Defaults.py concerning DEFAULT_URL # vs. DEFAULT_URL_HOST. - hostname = ((mm_cfg.DEFAULT_URL - and urlparse.urlparse(mm_cfg.DEFAULT_URL)[1]) - or mm_cfg.DEFAULT_URL_HOST) + hostname = 'lists.freebsd.org' return hostname.lower() --- ./templates/en/postheld.txt 2016-04-17 11:52:38.000000000 -0700 +++ ./templates/en/postheld.txt 2016-04-29 15:23:06.180792000 -0700 @@ -13,3 +13,11 @@ this posting, please visit the following URL: %(confirmurl)s + +PLEASE NOTE! If you would like to post freely to the list, please subscribe +first. If you post from multiple addresses, you can subscribe each address +and go into the options page and select 'no mail' for all but one address. +This will allow you to post without delay in the future. + +Sorry for the hassle, but certain immature people made this necessary. + --- ./bin/check_perms 2016-04-17 11:52:38.000000000 -0700 +++ ./bin/check_perms 2016-04-29 15:23:06.181083000 -0700 @@ -374,8 +374,9 @@ if __name__ == '__main__': + doit = False try: - opts, args = getopt.getopt(sys.argv[1:], 'fvh', + opts, args = getopt.getopt(sys.argv[1:], 'Ffvh', ['fix', 'verbose', 'help']) except getopt.error, msg: usage(1, msg) @@ -383,11 +384,17 @@ for opt, arg in opts: if opt in ('-h', '--help'): usage(0) + elif opt in ('-F'): + doit = True elif opt in ('-f', '--fix'): STATE.FIX = True elif opt in ('-v', '--verbose'): STATE.VERBOSE = True + if not doit: + print _('use -F to actually run - takes forever on hub') + sys.exit(0) + checkall() checkarchives() checkarchivedbs()