Exchange strips formatting off of messages via IMAP

163 views
Skip to first unread message

granroth

unread,
Sep 14, 2010, 9:11:31 PM9/14/10
to Windows Admin Group
This was originally posted in plug-discuss but, obviously, it makes
more sense here.

I need to connect to an Exchange server for email at work but, having
a Linux desktop, I do so via IMAP using Thunderbird (or KMail and,
every so often, Evolution). This works mostly okay. The one part
that doesn't work is that the IMAP server part of Exchange completely
strips off all formatting in the messages.

Now this is fine 90% of the time but every so often, a message will
have very specific formatting for a specific reason (passages
highlighted, tables, formatted code, etc). That message will look fine
in Outlook but will be stripped down to plain-text when viewed via
IMAP.

This is *not* Thunderbird. I've verified that it's the IMAP server by
doing a quick telnet to 143 and seeing the raw output.

My question is this: is there any way to configure the Exchange IMAP
server to not strip off formatting? If so, I may be able to suggest
that our admins do whatever steps are necessary.

Bryan mentioned on plug-discuss that it's not necessarily a default
configuration of the IMAP part of Exchange and may be dependent on the
version. I am not the administrator of this server nor do I know him
personally. However, if I knew how to change this, I could
potentially convince someone who can change it, to change it.

The version is Exchange 2003.

Thanks,
Kurt

Bryan O'Neal

unread,
Sep 15, 2010, 12:53:04 AM9/15/10
to wa...@googlegroups.com
Hey Kurt if no one else has any suggestions I will see if I can not
get time to poke around my 2003 install this week and find an answer.

Stephen

unread,
Sep 15, 2010, 11:05:05 AM9/15/10
to wa...@googlegroups.com
I checked Experts exchange on this (i have a paid acct there) and
haven't found anything. If we need to I can post the question there.

but this really does appear to be part of the Server's settings for
IMAP, but ones i have not run into before.

On Tue, Sep 14, 2010 at 6:11 PM, granroth <kurt.g...@gmail.com> wrote:

--
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen

SeanG

unread,
Sep 16, 2010, 1:20:39 AM9/16/10
to Windows Admin Group
Google search --> exchange imap message formatting plain text

result:

"html mail from M$ Exchange comes as text/plain"
http://forums.mozillazine.org/viewtopic.php?f=39&t=628678

short answer:
Your admin has the ability to modify how Exchange treats POP/IMAP
message retrieval formatting on a global basis across your Exchange
environment or on a per mailbox basis using the powershell command as
shown below... actual process in the GUI is likely to be different in
your '03 environment but the powershell command should work on '03,
'07 or '10 mailboxes without issue

details:

Outlook/Exchange uses RTF internally, and converts it when you
download the message with POP or IMAP. The following options are
available in the server settings:
o Text
o Html
o Html and alternative text
o Enriched text
o Enriched text and alternative text
o Best body format

(Enriched text is TNEF - aka winmail.dat)
M$ doesn't document things very well, but "Best Body Format" seems to
mean "Plain Text" unless the message has attachments or needs more(?)
formatting, then use HTML.
Ask your network admin to change the "IMAP server settings, Message
Retrieval, Mime Format" setting to either "HTML" or "HTML and text",
then restart the IMAP4 service.
_____________________________

...
This is for anyone looking for an answer to why text/html and
multipart/alternative messages won't work (show up as text/plain) when
using an IMAP/POP connection to Exchange 2007 vs. working when using
Outlook in Exchange mode.

I first tried setting the default message MIME format to "anything
html" (tip from above) using the Exchange 2007 gui by going to server
config -> client access -> POP3 and IMAP4 -> IMAP4 -> properties ->
retrieval settings -> message MIME format, and then restarting the
Exchange IMAP service after changing that setting. This never seemed
to change anything, i.e., all the messages that were sent as text/html
from an external account were still showing up as text/plain in the
Exchange 2007 IMAP account (Thunderbird and Mutt), while the message
was text/html in Outlook w/ Exchange mode. I was finally able to get
it working by using the Exchange Management Shell and running this:

[PS] C:\Windows\System32>set-CASMailbox -Identity USERNAME -
ImapMessagesRetrievalMimeFormat HtmlAndTextAlternative

and then restarting the IMAP service.

For reference, the important headers changed from:
Content-Type: text/plain; charset="utf-8"

To:
(when ImapMessagesRetrievalMimeFormat is set to HtmlOnly)
Content-Type: text/html; charset="utf-8"

(when ImapMessagesRetrievalMimeFormat is set to
HtmlAndTextAlternative)
Content-Type: multipart/alternative;
boundary="_000_86fde198667e4cfe9ece2930e2e516ddd888sem2warnerwirenet_"

Hope this helps someone out!

granroth

unread,
Sep 16, 2010, 8:30:27 PM9/16/10
to Windows Admin Group
This is perfect! Thank you!

I love that Google query, too -- it's the exact inverse of what I kept
searching for. My queries all looked like so:

exchange imap message remove formatting
or
exchange imap remove richtext

It was all about removing functionality (a negative action) rather
than what we end up with (a positive action). Funny!

We'll see how receptive my exchange admin is now...
Reply all
Reply to author
Forward
0 new messages