Incoming messages all plain text

I am new to RT and setup a 4.0.1 server about a month ago. I am trying to get html messages that RT is receiving to show when a ticket is created but the email is converted to text/plain and all formatting is lost. Other postings talking about html stated to set the ‘PreferRichText’ to true, or 1, which is what the setting was by default, and I have seen no change. Would this conversion to plain text be occurring in the mailgate processing of the message? Is this a problem with the ScrubHtml or is it even getting to a point of being scrubbed?
Thanks for any assistance you can provide.

I am new to RT and setup a 4.0.1 server about a month ago. I am trying to get html messages
that RT is receiving to show when a ticket is created but the email is converted to text/plain
and all formatting is lost. Other postings talking about html stated to set the
`PreferRichText’ to true, or 1, which is what the setting was by default, and I have seen no
change. Would this conversion to plain text be occurring in the mailgate processing of the
message? Is this a problem with the ScrubHtml or is it even getting to a point of being
scrubbed?

You’ll need to tell us more about where you’re seeing text/plain. In
the web ui? In outgoing email? In links on the ticket history? A
small screenshot may be the easiest way to explain.

-kevin

This is appearing in the ticket history where the text from the original message is listed. Attached is a screenshot showing the history and the text that has been changed to plain text.

Thanks,

John-----Original Message-----

You’ll need to tell us more about where you’re seeing text/plain. In the web ui? In outgoing email? In links on the ticket history? A small screenshot may be the easiest way to explain.

-kevin

This is appearing in the ticket history where the text from the
original message is listed. Attached is a screenshot showing the
history and the text that has been changed to plain text.

You need to check in the Attachments table off of Transactions, but
that certainly appears that you only got a text plain mail into RT.
You can click on Download and see what the content actually looks
like.

-kevin

I have looked at the Attachments table and the messages are also listed there as ‘text/plain’. I’ve attached the ‘Download’ so you can ‘see what the content actually looks like’ and I’ve also attached the original message.

I stopped Fetchmail and sent an HTML message to the mailbox that RT checks. The message in the mailbox was still in HTML format so our mail server is not changing it in any way. Fetchmail has no ability to change the formatting of a message as it is simply downloading the message from our mail server and passing it to rt-mailgate . It is being changed once it gets into RT.

Could rt-mailgate be converting it? Could you explain to me the process that creates the ticket once the email gets into RT so I have a better idea where to look next? Should RT be accepting HTML in incoming emails or am I expecting functionality that isn’t there?

John-----Original Message-----

You need to check in the Attachments table off of Transactions, but that certainly appears that you only got a text plain mail into RT.
You can click on Download and see what the content actually looks like.

-kevin

download.txt (50 Bytes)

Could rt-mailgate be converting it? Could you explain to me the
process that creates the ticket once the email gets into RT so I have
a better idea where to look next? Should RT be accepting HTML in
incoming emails or am I expecting functionality that isn’t there?

rt-mailgate doesn’t touch the format of the message at all. RT accepts
HTML mail just fine and has for a while. Display is all that’s improved
recently.

Run a query like this and send the results:

select parts.* from Attachments a join Attachments parts on
a.id=parts.Parent where
a.MessageId=‘CAP5SNsEgyCSDQk6no6NpdiGy_v+=ktq1Uf8M64tcLoOpd5AENw@mail.gmail.com’\G

If you’re on Pg, replace \G with a semicolon and run \x before running
the query.

Thomas

Please keep your responses on the mailing list.

I ran the query you listed and it returns with ‘Empty set’.

No results means that the message in question had no MIME parts, but was
made up of just a single MIME entity.

There is a record in the Attachments table with a MessageId of
CAP5SNsEgyCSDQk6no6NpdiGy_v+=ktq1Uf8M64tcLoOpd5AENw@mail.gmail.com
which I see when I run:

select * from Attachments where MessageId=‘CAP5SNsEgyCSDQk6no6NpdiGy_v+=ktq1Uf8M64tcLoOpd5AENw@mail.gmail.com’\G
(see attached results)

The results of this query show me what I need to know. Note that the
content type is text/plain, not multipart/alternative as expected with
both a text/plain and text/html part included (both in the parsed
ContentType column and the raw Headers column). This means that when RT
received the message, it had no HTML part. I suspect something else is
munging your message before it gets into RT.

Do you have spam/virus filtering setup? What’s your fetchmailrc look
like? You can try having fetchmail pipe the messages it fetches to a
different command instead of rt-mailgate to capture what it downloads.

Thomas

Thanks for the help Thomas. I have determined that the problem is related to messages coming through our Exchange server. I setup a test mailbox on another mail server and the messages come through properly with “Content-Type: multipart/alternative” and the HTML is intact.From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Thursday, August 25, 2011 12:24 PM
To: RT Users
Subject: Re: [rt-users] Incoming messages all plain text

Please keep your responses on the mailing list.

I ran the query you listed and it returns with ‘Empty set’.

No results means that the message in question had no MIME parts, but was made up of just a single MIME entity.

There is a record in the Attachments table with a MessageId of
CAP5SNsEgyCSDQk6no6NpdiGy_v+=ktq1Uf8M64tcLoOpd5AENw@mail.gmail.com
which I see when I run:

select * from Attachments where
MessageId=‘CAP5SNsEgyCSDQk6no6NpdiGy_v+=ktq1Uf8M64tcLoOpd5AENw@mail.gm
ail.com’\G
(see attached results)

The results of this query show me what I need to know. Note that the content type is text/plain, not multipart/alternative as expected with both a text/plain and text/html part included (both in the parsed ContentType column and the raw Headers column). This means that when RT received the message, it had no HTML part. I suspect something else is munging your message before it gets into RT.

Do you have spam/virus filtering setup? What’s your fetchmailrc look like? You can try having fetchmail pipe the messages it fetches to a different command instead of rt-mailgate to capture what it downloads.

Thomas
RT Training Sessions (http://bestpractical.com/services/training.html)

  • Chicago, IL, USA September 26 & 27, 2011
  • San Francisco, CA, USA October 18 & 19, 2011
  • Washington DC, USA October 31 & November 1, 2011
  • Melbourne VIC, Australia November 28 & 29, 2011
  • Barcelona, Spain November 28 & 29, 2011