Indy 10.0.52: Generated Message boundaries violates RFC

Giganews Newsgroups
Subject: Indy 10.0.52: Generated Message boundaries violates RFC
Posted by:  Holger Dors (do…@kittelberger.de)
Date: Tue, 14 Dec 2004

Hello,

I'm using Indy 10.0.52 for generation of a fairly complex mail: it's an
HTML Mail with inline images, an plain text alternative and an
attachement. The generated message looks something like this:

----------------------- cut -----------------------

Subject: Opera Test
Content-Type: multipart/mixed;
boundary="MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevS"
MIME-Version: 1.0
Date: Mon, 13 Dec 2004 17:45:28 +0100

This is a multi-part message in MIME format

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevS
Content-Type: multipart/alternative;
        boundary="MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSf"

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSf
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

This is a test for Opera

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSf
Content-Type: multipart/related;
        boundary="MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSff"

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSff
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html>
<head><title>Opera test</title></head>
<body>
<h1>This is a test for Opera.</h1>
<p>Here is an inline image:</p>
<img src=3D"cid:test">
</body>
</html>

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSff
Content-Type: image/gif;
        name="operalogo.gif"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
        filename="operalogo.gif"
Content-ID: <test>

[base64 portion trimmed]

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSff--

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSf--

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevS
Content-Type: application/zip;
        name="Jor's7.50setups.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
        filename="Jor's7.50setups.zip"

[base64 portion trimmed]

--MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevS--

----------------------- cut -----------------------

Now, Yngve Nysaeter Pettersen, a Opera developer, pointed this out:

"[...] but the boundary

  "MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSf"

is a prefix of the boundary

  "MYBCiajqohpCi=_AXx5Z34KYXyMbe9wevSff"

The MIME RFCs  explicitly states that the sequence used for the boundary
MUST
NOT exist in any of the bodyparts which the boundary is used to separate.

RFC 2046:

    The boundary delimiter MUST NOT appear inside any of the encapsulated
    parts, on a line by itself or as the prefix of any line.  This implies
    that it  is crucial that the composing agent be able to choose and
    specify a unique boundary parameter value that does not contain the
    boundary parameter value of an enclosing multipart as a prefix."

Is this a known bug? Should/Could UI file a bug report? Or has this fixed
in the current snapshot release already?

Is there any way for me to correct this problem with Indy 10.0.52 myself,
in other words: can I explicitly set the boudary markers myself?

Many thanks in advance,
  Holger Dors

Replies