From 6789acf6fcc94a2998dda7b4665659bf53749b66 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 4 Oct 2007 18:43:42 -0700 Subject: /cygdrive/c/MM_bzr/log.txt --- Mailman/Handlers/MimeDel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py index 906b12c3..01b126a8 100644 --- a/Mailman/Handlers/MimeDel.py +++ b/Mailman/Handlers/MimeDel.py @@ -256,4 +256,4 @@ def get_file_ext(m): fext = fext[1:] else: fext = '' - return fext + return fext.lower() -- cgit v1.2.3 From 73937af15be2c44c97a1b9d64c09d83d68d9b2bd Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 4 Oct 2007 19:52:04 -0700 Subject: MimeDel.py neglected to lower case file extensions for comparison with lower cased *_filename_extensions. Fixed. --- Mailman/Handlers/MimeDel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/MimeDel.py b/Mailman/Handlers/MimeDel.py index 01b126a8..523b3dfc 100644 --- a/Mailman/Handlers/MimeDel.py +++ b/Mailman/Handlers/MimeDel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2005 by the Free Software Foundation, Inc. +# Copyright (C) 2002-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License -- cgit v1.2.3 From 54f06c64004d154746c26aebbd28da65e716f438 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 4 Nov 2007 14:41:26 -0800 Subject: Added removal of Authentication-Results: header. --- Mailman/Handlers/CleanseDKIM.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/CleanseDKIM.py b/Mailman/Handlers/CleanseDKIM.py index 0c548a9a..c4b06613 100644 --- a/Mailman/Handlers/CleanseDKIM.py +++ b/Mailman/Handlers/CleanseDKIM.py @@ -29,8 +29,8 @@ from Mailman import mm_cfg def process(mlist, msg, msgdata): - if not mm_cfg.REMOVE_DKIM_HEADERS: - return - del msg['domainkey-signature'] - del msg['dkim-signature'] + if mm_cfg.REMOVE_DKIM_HEADERS: + del msg['domainkey-signature'] + del msg['dkim-signature'] + del msg['authentication-results'] -- cgit v1.2.3 From 6684e734f8e271aec3bf63233b19e2a57ce87d98 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 4 Nov 2007 15:03:38 -0800 Subject: - Cgi/options.py - fixed to not present the "empty" topic to user. - Handlers/CalcRecips.py - Changed to not process topics if topics are disabled for the list. --- Mailman/Handlers/CalcRecips.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/CalcRecips.py b/Mailman/Handlers/CalcRecips.py index e065ad68..75a8a457 100644 --- a/Mailman/Handlers/CalcRecips.py +++ b/Mailman/Handlers/CalcRecips.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -12,7 +12,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Calculate the regular (i.e. non-digest) recipients of the message. @@ -91,6 +92,10 @@ delivery. The original message as received by Mailman is attached. def do_topic_filters(mlist, msg, msgdata, recips): + if not mlist.topics_enabled: + # MAS: if topics are currently disabled for the list, send to all + # regardless of ReceiveNonmatchingTopics + return hits = msgdata.get('topichits') zaprecips = [] if hits: -- cgit v1.2.3 From 86384d9dc64e7e39e0c4c05847e15299dc6f9684 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 4 Nov 2007 15:19:31 -0800 Subject: Added Date and Message-ID headers to the confirm reply message that Mailman adds to the admin notification. --- Mailman/Handlers/Hold.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/Hold.py b/Mailman/Handlers/Hold.py index f6008d45..d4af8f9a 100644 --- a/Mailman/Handlers/Hold.py +++ b/Mailman/Handlers/Hold.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2006 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -283,6 +283,8 @@ also appear in the first line of the body of the reply.""")), dmsg['Subject'] = 'confirm ' + cookie dmsg['Sender'] = requestaddr dmsg['From'] = requestaddr + dmsg['Date'] = email.Utils.formatdate(localtime=True) + dmsg['Message-ID'] = Utils.unique_message_id(mlist) nmsg.attach(text) nmsg.attach(MIMEMessage(msg)) nmsg.attach(MIMEMessage(dmsg)) -- cgit v1.2.3 From 111095a6a719f4f155081def5615e1174c36e2ca Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Tue, 6 Nov 2007 17:41:17 -0800 Subject: - Scrubber.py Fixed an issue where an implicit text/plain part without any headers gets lost. Moved the cleansing of the filename extension to a place where it is guaranteed to be a string as opposed to an empty list. --- Mailman/Handlers/Scrubber.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py index 48660038..588dd9ac 100644 --- a/Mailman/Handlers/Scrubber.py +++ b/Mailman/Handlers/Scrubber.py @@ -45,7 +45,7 @@ from Mailman.Logging.Syslog import syslog # Path characters for common platforms pre = re.compile(r'[/\\:]') # All other characters to strip out of Content-Disposition: filenames -# (essentially anything that isn't an alphanum, dot, slash, or underscore. +# (essentially anything that isn't an alphanum, dot, dash, or underscore). sre = re.compile(r'[^-\w.]') # Regexp to strip out leading dots dre = re.compile(r'^\.*') @@ -298,7 +298,7 @@ URL: %(url)s # If the message isn't a multipart, then we'll strip it out as an # attachment that would have to be separately downloaded. Pipermail # will transform the url into a hyperlink. - elif part and not part.is_multipart(): + elif part._payload and not part.is_multipart(): payload = part.get_payload(decode=True) ctype = part.get_type() # XXX Under email 2.5, it is possible that payload will be None. @@ -349,7 +349,8 @@ URL: %(url)s text = [] for part in msg.walk(): # TK: bug-id 1099138 and multipart - if not part or part.is_multipart(): + # MAS test payload - if part may fail if there are no headers. + if not part._payload or part.is_multipart(): continue # All parts should be scrubbed to text/plain by now. partctype = part.get_content_type() @@ -447,8 +448,6 @@ def save_attachment(mlist, msg, dir, filter_html=True): ext = fnext or guess_extension(ctype, fnext) else: ext = guess_extension(ctype, fnext) - # Allow only alphanumerics, dash, underscore, and dot - ext = sre.sub('', ext) if not ext: # We don't know what it is, so assume it's just a shapeless # application/octet-stream, unless the Content-Type: is @@ -458,6 +457,8 @@ def save_attachment(mlist, msg, dir, filter_html=True): ext = '.txt' else: ext = '.bin' + # Allow only alphanumerics, dash, underscore, and dot + ext = sre.sub('', ext) path = None # We need a lock to calculate the next attachment number lockfile = os.path.join(fsdir, 'attachments.lock') -- cgit v1.2.3