[Tmail-talk] MIME boundaries changing underfoot? (or: gosh, I hate RFC 3156)

Maarten Oelering maarten at solovirtuoso.com
Mon Mar 3 03:51:36 EST 2008

I understand the message is composed in two phases, first the  
original content, here a multipart/mixed, is created. Then the  
original message is wrapped in a multipart/signed.

In the second phase, the original content should be added to the  
final message as-is, i.e. transparent, i.e. without modification. Not  
even the mime headers of the wrapped multipart/mixed are allowed to  
change. I think this will be difficult, since TMail will at least  
want to interpret the mime headers and even if the boundary is not  
changed, it may change little things like header line wrapping or  
indentation characters.

Did you also consider S/MIME for signing emails? I think S/MIME is  
more widely accepted than PGP.

Maarten Oelering

On 2-mrt-2008, at 4:47, Mikel Lindsaar wrote:

> On Sun, Mar 2, 2008 at 12:32 PM, Chris Powell  
> <chris at grubbybaby.com> wrote:
>> The challenge boils down to something very, very simple: is there  
>> a way to
>> get TMail to just 'trust me' and accept my fully-formed body-data and
>> headers without altering them at parse-time?  That way I could just
>> hand-assemble an exact string form of the message, then TMail-ify  
>> it and
>> send.
> TMail definitely clobbers every mimepart boundary, not quite sure if
> this is a feature or error ;)
> We could make it only create a new boundary if the existing boundary
> does not exist... something like a switch on:
> mail.rb:line 190 or so
> unless @header['content-type'].params['boundary']
>  bound = ::TMail.new_boundary
> end
> The above is really pseudo code as that would break, but that would be
> the gist of it.
> Any of the email experts on the list see any problem with that?
> I can only think if you are replying to an email that is multipart,
> that might break things as you could end up with the same mime
> boundary, potentially... or forwarding an email.... you might end up
> with two boundaries in the email, one set of real ones, and ones that
> are quoted, but as these wouldn't match /^--.*$/ it shouldn't not be a
> problem for the parser.
> Ideas list?
> Mikel
> _______________________________________________
> Tmail-talk mailing list
> Tmail-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/tmail-talk

More information about the Tmail-talk mailing list