Re: [Evolution] How does evo determine when to base64 encode?



On Tue, 2016-02-16 at 22:25 +0000, Johnson, Brett E (HP Cloud Linux
R&D) wrote:
Here at work, I've recently had a msexchange account shoved down my
throat, and
I've noticed that, using evolution-ews, evolution almost always base64-encodes
the body of my messages.  Yet, if I send the same message via SMTP, it is not
encoded.

        Hi,
do you send exactly the same message using Evolution, once through an
evolution-ews account, another time using SMTP? Evolution determines
how to encode the message body based on its content. It tries to pick
the best encoding (the one which generates smallest encoded blob). If
your message body contains too many non-ASCII (non-7bit) letters, then
either quoted-printable or base64 encoding is used.

Can anyone explain this?  Is there any way to turn it off?

I do not think so. If the answer is 'yes' for my question above, then
it clearly means that it's not done by the message composer, because it
always produces the same result.

I really don't want to send out base64 encoded blobs to anyone

Why does it matter for you? You see the base64 encoding only if you
check the message source. The message itself is decoded and shown
properly in UI (if it's not, then it's an issue on the client's side; I
remember Evolution used to have problem showing base64-encoded messages
too, but I think it's not true at least since 3.18.x).

By the way, there are circumstances where base64 encoding is required.
For example if you encrypt the message. The encrypted part contains
binary data (not text), thus the encoding is required to not have
modified the data by respective servers on the route from the sender's
machine to the receiver's machine.

If you want to debug what the evolution-ews does when it sends the
message, then run evolution from a terminal like this:

   $ EWS_DEBUG=2 evolution

Then resend any message through the EWS account, once the initial buzz
will end. You should see in the output something like
   <messages:CreateItem ...
(in time of the send) and inside it also
   <Message><MimeContent>...</MimeContent>
The content of <MimeContent/> is the message as passed to the server,
encoded as base64 (that is required here, because the envelope is an
XML document). I sent a very simple message, which was Subject:test; in
body:test, and the decoded MimeContent showed:
   Content-Type: text/plain
   Content-Transfer-Encoding: 7bit
thus no base64 in the message itself at all.

Checking message source in the Sent Items folder shows me pretty much
the same, no base64 encoding at all.

With respect of the Outlook, I do not know what version of Outlook you
use, neither what version of the Exchange server you connect to, but
since Exchange 2007, the servers can be connected through MAPI and EWS
protocol. Each behaves differently and your Outlook can use MAPI, not
EWS. In any case, the debugging will show what is passed to the server.
        Bye,
        Milan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]