[rt-users] Optimization for Outlook HTML

Christopher Gilmore c-gilmore at northwestern.edu
Tue Apr 28 21:14:55 EDT 2015

Christopher Gilmore wrote on 4/27/2015 10:42 AM:

> Has anyone been able to sanitize Outlook HTML to eliminate the extra whitespace? Either 
> through RT itself or by manipulating the message via procmail prior to handing it to 
> rt-mailgate?

Ok, I managed to do this the mostly-right way, but I'm curious to see if anyone has any tips for finishing the job. My lingering concern is that it's a bit of a kludge - I've made a static style definition on the server for a setting that can be changed in Outlook and could potentially vary between multiple messages associated with the same ticket. Has anyone figured out a way to dynamically parse the style information from the email?

The good news is that my kludge will address the vast majority of my users, as it works with the default Outlook configuration. For reference, in case anyone else needs to sort this out:

I installed the Permissive HTML Mail extension, which (among other things) allows for style invocations to be passed from the message body to the ticket history.

I added a custom css file at /opt/rt4/local/static/css/msfix.css in order to set the MsoNormal style and enabled it in RT_SiteConfig.pm with @CSSFiles. I also modified all the HTML templates to include the style declaration. In both cases, I pulled the style information directly from the body of a sample message.

CSS file:

/* /opt/rt4/local/static/css/msfix.css */
p.MsoNormal, li.MsoNormal, div.MsoNormal
/* end of /opt/rt4/local/static/css/msfix.css */

Template addition (before any HTML in the template, and quoted so as to not break Text::Template):

p.MsoNormal, li.MsoNormal, div.MsoNormal

More information about the rt-users mailing list