Hello everbody.

Gaetan reported a garbled message that i sent to him, and it
turned out that S-nail has problems to generate base64 encoding
when iconv(3) is also involved.  This is mostly a problem with the
message body, not with attachments with on-the-fly encoding (since
then the entire file has been converted already).  I.e., if base64
is not used (for data which goes over iconv) anything is all
right.  In fact Heirloom did not support base64 for that purpose
as such, likely for that reason.

Well, all this is "normally pretty easy", you generate a filter
chain (read data -> character set conversion -> content transfer
encoding -> write data), but that is not how the nail MIME layer
works.  That in turn is -- i think -- mostly because the BSD Mail
codebase, which is not MIME capable, works linewise, with a strong
input line <-> output line relation, which is the wrong way to
handle mail in the MIME world with multibyte character sets and
odd input/output relation transfer encodings, and no effort has
been taken to change that, yet.

So.  We now have a hacked (read: not final and the way i want it,
i want the filter chain) solution which works and generates
ISO-2022-JP mails just fine.  I am not yet there because we cannot
display those correctly again.  I.e., we now have the strange
situation that S-nail generates the messages correctly but cannot
display them so, whereas Heirloom mailx generates octet-stream
sauce with binary charset but displays the S-nail generated
message just fine (just like mutt or OpenSSL).

Tomorrow i will add a test that runs if we have iconv support.

Not before that i will release v14.9.3, the "crested tit nibbling
sunflower seeds".

P.S.: The base64 decoder of S-nail v14.9.0 has learned to tolerate
a lot of messed up content, and in fact it was the only one who
was capable to display the generated data.  It is a bit disturbing
that i never got responses for likely messed up content in the
passed, maybe all partners use S-nail for diplay purposes?!!!
That is to say, i Bcc: myself and i never had a problem.

P.P.S.: The base64 decoders that are around are pretty fault
tolerant, you can embed criminal content at your will.  For the
future it is planned to log that in S-mailx, other MUAs and
OpenSSL either are completely silent or do not dig it.  E.g., you
can split up base64 sequences, you can embed ! and many other such
characters and they simply will be skipped over.

Ciao.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to