[RCD] RC 1.2 - Corrupted e-mail headers while sending an html empty message

sgironella at schema31.it sgironella at schema31.it
Thu Jul 14 15:08:57 CEST 2016


Hello all,
I've recently posted a bug reporting to the Roundcube community forum
[1]
We have noticed a strange behavior with a fresh Roundcube 1.2 install
(no additional plugins enabled nor 'strange' custom config defined). 

To reproduce this, send an e-mail using the html editor, leaving a blank
content. 

Received e-mail has a 'text/html' content-type (instead of the expected
'multipart'). therefore client view raw mime-parts as e-mail content. 

Note that sent e-mail (taken from sender 'sent' mailbox) has the right
content-type (multipart) so it's perfectly readable. 

In addition, we have recorded a tcpdump session, that confirm our
impression of having two separate libraries handling in a different way
SMPT (for delivery) and IMAP (for storing e-mail within 'sent' inbox)
sections; that's what we got: 

IMAP SESSION (SAVE E-MAIL TO 'SENT' MAILBOX) - Note the right mime-type
and boundary here

* OK [CAPABILITY IMAP4rev1 AUTH=LOGIN AUTH=CRAM-MD5 ID LITERAL+] dbmail
3.2.3 ready.
A0001 LOGIN xxxxx at xxxxxx xxxxxxx
A0001 OK [CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT
QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE ID UIDPLUS WITHIN CONDSTORE
LITERAL+ ENABLE QRESYNC] User utente1 at mail.qa.schema31.it authenticated
A0002 LSUB "" Sent
* LSUB (\hasnochildren) "/" "Sent"
A0002 OK LSUB completed
A0003 LIST "" Sent
* LIST (\hasnochildren) "/" "Sent"
A0003 OK LIST completed
A0004 APPEND Sent (\Seen) {936+}
MIME-Version: 1.0
Content-Type: multipart/alternative;
 boundary="=_17681037babd7dadb94a79c2cf51cb1f"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 14 Jul 2016 14:23:01 +0200
From: Utente di TEST <utente1 at mail.qa.schema31.it>
To: stefano.gironella at gmail.com
Subject: prova 2
Organization: SC31
Message-ID: <a46919e3b0380e0dc85f82e475581740 at mail.qa.schema31.it>
X-Sender: utente1 at mail.qa.schema31.it
User-Agent: Roundcube Webmail/1.2.0

--=_17681037babd7dadb94a79c2cf51cb1f
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII

--=_17681037babd7dadb94a79c2cf51cb1f
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family:
Verdana,Gen=
eva,sans-serif'>

</body></html>

--=_17681037babd7dadb94a79c2cf51cb1f--

A0004 OK [APPENDUID 2028 2695213] APPEND completed
A0005 LOGOUT
* BYE
A0005 OK LOGOUT completed

SMTP SESSION (E-MAIL DISPATCH) - Note that content-type here is
'text/html' (maybe taken from the first non-empty mime-part?)

220 litio.roma.schema31.it ESMTP Sendmail 8.14.5/8.14.5; Thu, 14 Jul
2016 14:23:01 +0200 (CEST)
EHLO localhost
250-litio.roma.schema31.it Hello [10.33.100.158], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-STARTTLS
250-DELIVERBY
250 HELP
MAIL FROM:<utente1 at mail.qa.schema31.it>
250 2.1.0 <utente1 at mail.qa.schema31.it>... Sender ok
RCPT TO:<stefano.gironella at gmail.com>
250 2.1.5 <stefano.gironella at gmail.com>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Date: Thu, 14 Jul 2016 14:23:01 +0200
From: Utente di TEST <utente1 at mail.qa.schema31.it>
To: stefano.gironella at gmail.com
Subject: prova 2
Organization: SC31
Message-ID: <a46919e3b0380e0dc85f82e475581740 at mail.qa.schema31.it>
X-Sender: utente1 at mail.qa.schema31.it
User-Agent: Roundcube Webmail/1.2.0

--=_6e4cf8211c48e997305a4faab4020297
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII

--=_6e4cf8211c48e997305a4faab4020297
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html;
charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family:
Verdana,Gen=
eva,sans-serif'>

</body></html>

--=_6e4cf8211c48e997305a4faab4020297--
.
250 2.0.0 u6ECN1Je026469 Message accepted for delivery
QUIT
221 2.0.0 litio.roma.schema31.it closing connection 

Links:
------
[1] http://www.roundcubeforum.net/index.php/topic,23529.0.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20160714/cdb0f86a/attachment.html>


More information about the dev mailing list