Ron Brogden wrote:
>Howdy. While researching a problem that a user was having with long URLs
>getting wrapped in their Mac mail client I came across the following thread
>from last year dicussing the very same problem:
>
>http://mail.python.org/pipermail/mailman-users/2006-February/049477.html
>
>To summarize, "delsp=yes; format=flowed" is getting dropped during Mailman's
>parsing of the message. At the time of the note above Mark Sapiro said that
>this was due to a mix of issues within Mailman plus the underlaying Python
>libraries.
>
>Has there been any change of the status of this issue or is the only
>workaround still to turn off attachement scrubbing and empty the header /
>footer?
It's been on my ToDo list long enough. Attached is a patch you can try
if you are willing. This patch should preserve the format and delsp
parameters on Content-Type headers for the original message body.
A couple of remarks.
If msg_header and/or msg_footer contain lines with trailing spaces, if
these are added to a Format=flowed message body, the header and/or
footer will be flowed by the end MUA - make sure these do not have
trailing spaces.
In looking at the code to develop the patch, I don't really see how the
dropping of the Format and DelSp parameters causes ultimate improper
wrapping of scrubber URLs, so I'm not sure that this patch fixes that.
The problem is real and definitely manifests itself in other ways, so
the patch (assuming it is good - I did test it to make sure it didn't
break anything obvious) is needed. I'm just not sure if it will fix
your immediate problem.
Please try the patch if you can, and report. If it doesn't fix the
wrapped URLs, I'll probably need message samples to figure it out.
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
Index: Decorate.py
===================================================================
--- Decorate.py (revision 8147)
+++ Decorate.py (working copy)
@@ -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
@@ -115,9 +115,15 @@
payload = payload.encode(mcset)
newcset = mcset
# if this fails, fallback to outer try and wrap=true
+ format = msg.get_param('format')
+ delsp = msg.get_param('delsp')
del msg['content-transfer-encoding']
del msg['content-type']
msg.set_payload(payload, newcset)
+ if format:
+ msg.set_param('Format', format)
+ if delsp:
+ msg.set_param('DelSp', delsp)
wrap = False
except (LookupError, UnicodeError):
pass
Index: Scrubber.py
===================================================================
--- Scrubber.py (revision 8147)
+++ Scrubber.py (working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2006 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-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
@@ -380,7 +380,13 @@
text.append(t)
# Now join the text and set the payload
sep = _('-------------- next part --------------\n')
+ format = msg.get_param('format')
+ delsp = msg.get_param('delsp')
replace_payload_by_text(msg, sep.join(text), charset)
+ if format:
+ msg.set_param('Format', format)
+ if delsp:
+ msg.set_param('DelSp', delsp)
return msg
------------------------------------------------------
Mailman-Users mailing list
[email protected]
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