Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail message is shown with empty body #2435

Closed
rcubetrac opened this issue Sep 28, 2009 · 24 comments

Comments

@rcubetrac
Copy link

commented Sep 28, 2009

Reported by gardiol on 28 Sep 2009 08:52 UTC as Trac ticket #1486175

Please refer to this thread:

http://www.roundcubeforum.net/pending-issues/5439-blank-empty-message-body-see-email-source-inside.html#post21806

for detailed description including example of not-working email.

This bug is serius. Reported by three users so far. Any(!) other mail client shows the incriminated message.

This happens with both 0.3 and trunk (23 sept 2009).

Keywords: blank body empty message
Migrated-From: http://trac.roundcube.net/ticket/1486175

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by @alecpl on 28 Sep 2009 09:27 UTC

Works for me, so we need more info. What IMAP server and BODYSTRUCTURE response?

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Owner changed by @alecpl on 28 Sep 2009 09:27 UTC

=> none

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Milestone changed by @alecpl on 28 Sep 2009 09:27 UTC

later => 0.3.1

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by gardiol on 28 Sep 2009 09:31 UTC

IMAP server is qmail(?), how do i check the other? The problem sometimes shows up like this:

  • send an email from hotmail to me
  • reply from me to hotmail
  • replay back will show blank body

Not always, only sometimes. Seems to happen more often if i use the roundcube html editor.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by @alecpl on 28 Sep 2009 09:35 UTC

So, we need the all messages source. To check BODYSTRUCTURE you'll need to enable imap_debug option. This will create logs/imap file.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by gardiol on 28 Sep 2009 09:59 UTC

Replying to alec:

So, we need the all messages source. To check BODYSTRUCTURE you'll need to enable imap_debug option. This will create logs/imap file.

First of all, i try to upload another email message that does not show up, its part of the same thread. I have not saved the rest of the thread, only the last two messages. When i noticed the problem i had already deleted the older messages.

Attached is also the log from imap_debug relative to when i openend the attached email.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by @alecpl on 28 Sep 2009 10:04 UTC

email2.eml also works for me. The trace is not complete. We need trace from opening the message, maybe it's cached, enable devel_mode option.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by gardiol on 28 Sep 2009 12:19 UTC

I have added the extended trace with devel_mode set to true in config/main.php.inc
Maybe you can check the forum post above and get more non working emails from there? I can only post mine...

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by @alecpl on 28 Sep 2009 12:32 UTC

Replying to gardiol:

I have added the extended trace with devel_mode set to true in config/main.php.inc
Maybe you can check the forum post above and get more non working emails from there? I can only post mine...
Your mail works for me. That trace is not enought. You have probably BODYSTRUCTURE cached in DB. If so, try with sql_debug.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by robert penz on 28 Sep 2009 13:10 UTC

I'm running courier as imap server and have the same problem. I've root access on the server and did take a look at the mail file on the server. I copied the file also to an other user, same problem. Here is the file directly from the server, if I remove the empty line after "X-OriginalArrivalTime:" every works!

Delivered-To: xxxxx@penz.name
Return-Path: <xxxxx@hotmail.com>
Received: from bay0-omc2-s6.bay0.hotmail.com (bay0-omc2-s6.bay0.hotmail.com [ by mail.penz.name with esmtp; Fri, 25 Sep 2009 09:23:16 +0200
  id 00000000006DC02A.000000004ABC6FE5.0000161B
Received: from BAY134-W14 ([65.55.139.49](::ffff:65.54.246.142])
)) by bay0-omc2-s6.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959);
         Fri, 25 Sep 2009 00:17:45 -0700
Message-ID: <BAY134-W141C4AA5D45CB4832B5437EDD90@phx.gbl>
Old-Return-Path: xxxxxx@hotmail.com
Content-Type: multipart/alternative;
        boundary="_8549772e-d023-4457-a318-d9f5977c3ac6_"
X-Originating-IP: [Martina xxxxxx <xxxxx@hotmail.com>
To: "xxxx xxxxx" <xxxx@penz.name>,
      karin xxxxx <xxxx@hotmail.com>
Subject: RE: hochzeit carolina
Date: Fri, 25 Sep 2009 07:17:45 +0000
Importance: Normal
In-Reply-To: <1816a1c66e5a3879837c8ad903fc4018@localhost>
References: <25474ef299f218fc5c0250a608b61c5b@localhost>
 <COL105-W354DCE7C039A55F68BF5ACF2DB0@phx.gbl>
X-OriginalArrivalTime: 25 Sep 2009 07:17:45.0680 (UTC) FILETIME=[47833500:01CA3DB0](xxx.xxx.xxx.xxx]
From:)


 <1816a1c66e5a3879837c8ad903fc4018@localhost>
MIME-Version: 1.0

--_8549772e-d023-4457-a318-d9f5977c3ac6_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


hallo=2C

.......

--_8549772e-d023-4457-a318-d9f5977c3ac6_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>

...........

</html>=

--_8549772e-d023-4457-a318-d9f5977c3ac6_--

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by @alecpl on 28 Sep 2009 13:17 UTC

Robert, your message is another story. It's not proper MIME mail, so probably your server is unable to response with proper BODYSTRUCTURE. Check this as stated in comments to this ticket.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Sep 28, 2009

Comment by robert penz on 28 Sep 2009 19:37 UTC

@alec: Everything worked with roundcube 0.2 for month, as soon as I did an upgrade to 0.3 it stopped for some mails. Nothing has been changed on the imap server part or the MTA.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 1, 2009

Comment by gardiol on 1 Oct 2009 08:05 UTC

Replying to atd:

This is getting more and more annoying, now it happens to all the threads i exchange with hotmail people:

i write them -> OK
they anwser back -> OK
i answer back -> OK
they answer back -> BLANK...

Even this is a hotmail problem, any other email client i use (horde, kmail) shows the body with no problem, so i believe it should be fixed anyway.

I will try something, them post back here.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 1, 2009

Comment by gardiol on 1 Oct 2009 08:50 UTC

I confirm, this happens ONLY after Hotmail replyes to a message that roundcube has sent after receiving it from Hotmail...

I tryied to study a bit the RC sources but i got stuck. I do not know enough of PHP/AJAX to understand the mess... sorry i cannot do much more myself!

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 1, 2009

Comment by gardiol on 1 Oct 2009 09:05 UTC

Ok, anybody can check and confirm this bug. Just open up a hotmail account and send back and forth an email...

Also, a "broken" email shows up like this in horde, while it shows up blank in RC:

Data:        Thu, 1 Oct 2009 07:49:59 +0000 [CEST](09:49:59)
Da:      removed <removerd@hotmail.com>
A:      me <me@gardiol.org>
Oggetto:    RE: Scusami...
Intestazioni:   Mostra Tutte le Intestazioni

 <f4519316fcee74439c086f6a95c85155@127.0.0.1>
MIME-Version: 1.0

--_9bacaa67-7e67-4bd4-a97c-8d784ebdc8a2_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable


non =E8 che ci tengo=2C ma non possiamo blah blah blah


=20

As you can see, the message is really broken, BUT RC should show it anyway, even broken.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 1, 2009

Comment by @alecpl on 1 Oct 2009 10:19 UTC

The message is broken, but Dovecot is able to return proper BODYSTRUCTURE. So it's hotmail's but also your IMAP server issue. Currently Roundcube relies on BODYSTRUCTURE reply. There are tickets in trac to handle raw messages if BODYSTRUCTURE is broken. We need to see what is bodystructure for those messages (there's no such info in attached debug listings).

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 1, 2009

Status changed by @alecpl on 1 Oct 2009 10:19 UTC

new => closed

@rcubetrac rcubetrac closed this Oct 1, 2009
@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 8, 2009

Comment by cpanelphil on 8 Oct 2009 18:05 UTC

See attachment roundcubemail-0.3-stable.cpanel.patch above.

In rcube_message.php, if the call to $this->imap->get_structure returns false, it treats the rest of the message as a raw body. This mimics the behavior of other mail clients that are at least showing a munged message.

I am detecting a specific pattern of NILs in the return of the BODYSTRUCTURE call (see the example in the comment in the patch). Is there a more robust way to detect this?

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 8, 2009

Comment by @alecpl on 8 Oct 2009 18:22 UTC

Some servers returns different "bogus bodystructure". That's my proposition (from current rcube_imap.php):

/*
        @TODO: here we can recognize malformed BODYSTRUCTURE and parse
        the message in other way to create our own message structure.
        Example of structure for malformed MIME message:
        ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 2154 70 NIL NIL NIL)

        if ($headers->ctype != 'text/plain'
          && !is_array($structure[&& $structure[0](0])) == 'text'
          && !is_array($structure[&& $structure[1](1])) == 'plain')
          { }
      */
@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 9, 2009

Comment by gardiol on 9 Oct 2009 06:25 UTC

I can confirm that both patches works properly with my malformed hotmail messages. The second one looks better tough, seems more general.

Thank you people!

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 10, 2009

Comment by robert penz on 10 Oct 2009 06:32 UTC

where do I need to insert the second patch? can someone make a diff for it also? thx.

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 13, 2009

Comment by atd on 13 Oct 2009 09:48 UTC

I also tried to apply it but didn't know how to

@rcubetrac

This comment has been minimized.

Copy link
Author

commented Oct 13, 2009

Comment by @alecpl on 13 Oct 2009 09:50 UTC

Here's a complete patch http://trac.roundcube.net/changeset/3034

@rcubetrac rcubetrac added this to the 0.3.1 milestone Mar 20, 2016
@consultantseo

This comment has been minimized.

Copy link

commented May 13, 2017

Hello,

I'm facing exactly the same issue with only 1 sender. Until recently, his messages were showing. But since last Thursday, their body looks empty: though I can see the body and read it within the source code
http://i.imgur.com/FMWlaNx.jpg.

If the message is forwarded to Outlook, we can read it: http://i.imgur.com/PyLxCYU.jpg

If I read it on my iPhone, the same issue happens: http://i.imgur.com/tdHwVbh.jpg.

Thanks in advance for your help.

Best regards,
Florence.

fichier-13 05
2017-05-13_11-43-23
2017-05-13_11-42-31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.