On Wed, 2003-08-06 at 18:48, Chuq Von Rospach wrote:
> So it seems to be Mailman making an unsafe assumption about how the
> MIME is constructed, not a problem with an incoming message.
>
> Barry? What's your thought here?
If it's really the digest.mbox file that's busted here (and you can
check by looking at lists/<yourlist>/digest.mbox before the next digest
is sent out), then it's likely something in the scrubber. Try to find
the matching offending message in your archive's .mbox file and send me
a copy of that. I'll run it through my own scrubber and see what
happens.
If the scrubbing leaves the text/plain payload without a trailing
newline then indeed it will get into the digest.mbox file that way, and
that will screw up the digest parsing later. In that case, then the
following (untested) patch might do the trick.
If this patch works, then I'll probably apply it as a fallback, but I'll
want to make sure the scrubber is fixed too, otherwise it's possible
that your mbox archive is also broken (though you wouldn't notice it
until you regenerated your pipermail archives).
-Barry
Index: ToDigest.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/ToDigest.py,v
retrieving revision 2.27
diff -u -r2.27 ToDigest.py
--- ToDigest.py 11 Apr 2003 03:06:14 -0000 2.27
+++ ToDigest.py 6 Aug 2003 23:22:24 -0000
@@ -74,8 +74,13 @@
mboxfp = open(mboxfile, 'a+')
finally:
os.umask(omask)
- g = Generator(mboxfp)
- g.flatten(msg, unixfrom=True)
+ # Get the message as a string, with the envelope, which is required by the
+ # UnixMailbox code which composes the digest.
+ msgstr = msg.as_string(unixfrom=True)
+ extra = not msgstr.endswith('\n')
+ mboxfp.write(msgstr)
+ if extra:
+ mboxfp.write('\n')
# Calculate the current size of the accumulation file. This will not tell
# us exactly how big the MIME, rfc1153, or any other generated digest
# message will be, but it's the most easily available metric to decide
_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers