Apologise (was: Re: IF STATEMENTS)

Martin Armstrong martin at tactilis.co.uk
Sat Oct 20 15:29:03 EDT 2001


In article <20011018102800.11c71435.use-net at schabi.de>, Markus Schaber
<use-net at schabi.de> writes

>On Thu, 18 Oct 2001 00:20:05 +0200, Markus Schaber <use-net at schabi.de>
>wrote:

[A PGP signed message that some of us could not read on c.l.py]

>I have to apologise for this message.
>
>At first, it was intended to go to per mail only.
>
>And second, it seems that some news readers have problems with
>MIME-signed messages.
>
>This messages should _not_ display as empty messages with attachment as
>some people have told me.

It is not an empty message with an attachment Markus.

>In my eyes, they look conform to the standards, and the first part with
>type text/plain is the content.

There is nothing wrong with the message that you *sent* .

However, there is a problem with it when it gets to Usenet on
comp.lang.python if you post via mail.python.org.

The headers of the message you sent has:

Content-Type: multipart/signed; protocol="application/pgp-signature";
 boundary="=.':S84?'b+rS._7"

But when it got to c.l.py the header had been changed to:

Content-Type: multipart/signed; protocol="application/pgp-signature";
 boundary="=.': S84?'b+rS._7"

(see the space after the colon in the boundary string)


The multipart boundary string in the header no longer matches the
boundary string in the body of the message. On receipt of the message
some people's News clients complain that it is invalid, while others
simply display an empty message.


I have seen the same problem with signed postings from Jürgen Erhard
too. Jürgen's client produces headers like:

Content-Type: multipart/signed;
 boundary="pgp-sign-Multipart_Thu_Jul_12_02:23:43_2001-1";

These get mangled to:

Content-Type: multipart/signed;
 boundary="pgp-sign-Multipart_Thu_Jul_12_02: 23:43_2001-1";

(once again a space has been inserted into the boundary string)


Jürgen looked into this problem and found that it is a bug in Mailman
which is used to implement the mail->news gateway.

The problem occurs if a header is split over two lines (as your's and
Jürgen's are). Continuation lines begin with a leading space.


I'll quote from Jürgen's email to me when he found the problem:

>The mail->news gateway does this...
>
>Looking in /usr/lib/mailman, doing a grep -ri news . there, and I find
>Mailman/Handlers/ToUsenet.
>
>There's no handling of Mime, and no mention of Content-type.
>
>But: I see a "NNTP is strict about spaces after the colon in headers".
>And me thinking, "Hey, there's a new space *after* a *colon*... might
>this be the first in the line?"
>
>Yep, that's it... the code simple goes through all the lines in the
>headers section (*not* the headers!), and inserts a space after the
>first colon if there is none.
>
>*Gggaaahhh*  ;-)

As a consequence, the boundary strings in the continuation line get
modified if they contain a colon :-(

So Markus, it is not your fault at all.

Jürgen emailed Barry Warsaw when we found the fault, but Mailman doesn't
seem to have been fixed yet.

Or maybe it has been fixed and the gateway has simply not been updated
to the new version. It appears to be using X-Mailman-Version: 2.0.6

I've emailed this article to Barry as a reminder that Mailman is still
causing problems on c.l.py.

As Jürgen says:
>The fix is of course *really* simple: just skip all the lines that
>start with whitespace.  But... that's for Barry now.


[Markus]
>Nevertheless, I won't send any signed messages here again, as long as
>this issue is not resolved.

Watch the c.l.py headers for a new version of Mailman being used and
then try another signed message.

HTH
-- 
Martin Armstrong                        <mailto:martin at tactilis.co.uk>



More information about the Python-list mailing list