David Schraeder: > Hi, > > I was wanting to know if anybody has done any header rewrite for a > content type. I am looking to work around and exchange bug where people > on exchange are sending calendar invites and they are set as > multipart/alternative. They do not show up in our clients(thunderbird, > roundcube, outlook express). I want to change the multipart/alternative > to multipart mixed so it will show the ics file attachment.
I have no first-hand experience with this, but I expect that a Milter could do the job. Milters can be written in C, Python, and other languages. They're plugins that see the message envelope and content as it arrives. At the end they can make some changes. First, the Milter sees the "primary" message header that contains, Received:, Date: From:, To:, Subject: etc., as well as Content-type: Multipart/Alternative Next, the Milter sees all content after the "primary" message header as body content. It should be possible to detect a message contains a calendar invite. Then, at the end of the message, the Milter can replace that "Content-type: Multipart/Alternative" header with "Content-type: multipart/mixed". Wietse