Hi all, Mark Sapiro wrote: > Todd Zullinger wrote: >> Attached is the original message from the list mbox and one that I >> munged up to included a content-type: text/plain; charset=3Dus-ascii. > > > I see the symptom with the original message. I'll look further, but it > seems to have something to do with the fact that the first sub-part > has no headers at all. I have looked at RFC 2045 and I don't see that > any headers are required, but I don't yet know what the underlying > issue in Scrubber is. > It looks like the problem is something to do with email package behavior. Here is a test code to reproduce the problem:
---------------- from email import message_from_string s = '''MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ABCDEFG" Preamble --ABCDEFG A message without header --ABCDEFG Content-Disposition: inline Another text with a header --ABCDEFG-- ''' m = message_from_string(s) for p in m.walk(): print p.get_content_type() if p: print p.get_payload(decode=True) ---------------- This program prints out like this: multipart/mixed None text/plain text/plain Another text with a header Note that 'A message without header' is not printed out. If I remove 'If p:' and print the payload unconditionally, I get: multipart/mixed None text/plain A message without header text/plain Another text with a header Here, the no-header part is printed out. The patch of revision 7281 may have been over-protective against the bug-id: 1099138 in message reconstruction part (line 327 in http://mailman.svn.sourceforge.net/viewvc/mailman/branches/Release_2_1-maint/mailman/Mailman/Handlers/Scrubber.py?r1=7207&r2=7281 ) but we may have to be paranoid against wired message like no-header text. I believe well behaved MUAs won't generate no-header text parts. (or, I believed ;-) -- Tokio Kikuchi, [EMAIL PROTECTED] http://weather.is.kochi-u.ac.jp/ ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp