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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

sgironella

Hello all,
I've recently posted a bug reporting to the Roundcube community forum
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@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 [hidden email] 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 <[hidden email]>
To: [hidden email]
Subject: prova 2
Organization: SC31
Message-ID: <[hidden email]>
X-Sender: [hidden email]
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:<[hidden email]>
250 2.1.0 <[hidden email]>... Sender ok
RCPT TO:<[hidden email]>
250 2.1.5 <[hidden email]>... 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 <[hidden email]>
To: [hidden email]
Subject: prova 2
Organization: SC31
Message-ID: <[hidden email]>
X-Sender: [hidden email]
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


_______________________________________________
Roundcube Development discussion mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: RC 1.2 - Corrupted e-mail headers while sending an html empty message

A.L.E.C
On 07/14/2016 03:08 PM, [hidden email] wrote:
> Hello all,
> I've recently posted a bug reporting to the Roundcube community forum
> <http://www.roundcubeforum.net/index.php/topic,23529.0.html>
> 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.

What PHP version? What Mail_Mime version? What OS? Are you using SMTP
server (smtp_server option) in Roundcube config?

Sounds like https://github.com/roundcube/roundcubemail/issues/5283, but
in your case SMTP debug already confirms that we really send malformed
message, so not exactly the same.

--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer        [http://kolab.org]
Roundcube Webmail Developer  [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
_______________________________________________
Roundcube Development discussion mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: RC 1.2 - Corrupted e-mail headers while sending an html empty message

sgironella

Thanks for the reply, we have tested this issue on multiple workstation, mainly we have:

- PHP 5.5.X and 5.6.X

- OS Mac OS X and FreeBSD 10.3

- Mail_Mime version 1.10.0

and yes, SMTP server is defined within Roundcube config file.

 

 

Il 2016-07-14 16:02 A.L.E.C ha scritto:

On 07/14/2016 03:08 PM, [hidden email] wrote:
Hello all,
I've recently posted a bug reporting to the Roundcube community forum
<http://www.roundcubeforum.net/index.php/topic,23529.0.html>
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.

What PHP version? What Mail_Mime version? What OS? Are you using SMTP
server (smtp_server option) in Roundcube config?

Sounds like https://github.com/roundcube/roundcubemail/issues/5283, but
in your case SMTP debug already confirms that we really send malformed
message, so not exactly the same.

_______________________________________________
Roundcube Development discussion mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: RC 1.2 - Corrupted e-mail headers while sending an html empty message

A.L.E.C
On 07/14/2016 04:13 PM, [hidden email] wrote:
> - PHP 5.5.X and 5.6.X
> - OS Mac OS X and FreeBSD 10.3
> - Mail_Mime version 1.10.0

Anyway... I couldn't reproduce the issue, but I think fixes for
https://github.com/roundcube/roundcubemail/issues/5283 should solve your
issue.

Additionally I pushed a change for Mail_mime that you also could try
https://github.com/pear/Mail_Mime/commit/fd983f94dfe5602afe43bc7d5a71fccff26262b9

--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer        [http://kolab.org]
Roundcube Webmail Developer  [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl
_______________________________________________
Roundcube Development discussion mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: RC 1.2 - Corrupted e-mail headers while sending an html empty message

Brendan
On 16-07-14 10:58 AM, A.L.E.C wrote:
> On 07/14/2016 04:13 PM, [hidden email] wrote:
>> - PHP 5.5.X and 5.6.X
>> - OS Mac OS X and FreeBSD 10.3
>> - Mail_Mime version 1.10.0
>
> Anyway... I couldn't reproduce the issue, but I think fixes for
> https://github.com/roundcube/roundcubemail/issues/5283 should solve your
> issue.

i believe this is the bug that is being hit - it's exactly the same
problem description that led me to raise it with thomas back in may.
_______________________________________________
Roundcube Development discussion mailing list
[hidden email]
http://lists.roundcube.net/mailman/listinfo/dev