Author Topic: Fix malformed mailbox  (Read 2668 times)

Offline strfkm

  • Newbie
  • *
  • Posts: 1
Fix malformed mailbox
« on: July 19, 2015, 11:40:55 AM »
Hi guys,

I have a problem with my imap mailbox which has 4 lines of useless mail header + whole raw real msg as text in the mail->body part and I would like to rebuild it and feed this message into RoundCube in order to see in correctly in graphic view.

For example, a normal email has:

Header details
           x-store-info:
            ...
           Mime-Version: 1.0
           Content-Type: multipart/alternative; boundary="250550555899e9fddf34"
Header
           From: xx@xx.com
           To: xx@xx.com
Body
           Boundaries
           Plain text messages
           HTML messages
           Images

My mailbox has:

Header details
           Nothing here
Header
           Always four
           lines of useless
           header which I have to suppress
           from msg decode
Body
           x-store-info:
            ...
           Mime-Version: 1.0
           Content-Type: multipart/alternative; boundary="250550555899e9fddf34"
           From: xx@xx.com
           To: xx@xx.com
           Boundaries
           Plain text messages
           HTML messages
           Images

I was looking at Roundcube code and I found rcube_imap.php/rcube_imap_generic which does the access to IMAP server and fetch messages, so I guess I should do something on here but I could not find the right place to change the code.

Can someone please help me with this issue?

Thank you very much!