6.0.0-beta1
7/3/25

[#12294] Cannot open message
Summary Cannot open message
Queue IMP
Queue Version 6.0.5
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester azurit (at) pobox (dot) sk
Created 06/03/2013 (4413 days ago)
Due
Updated 06/05/2013 (4411 days ago)
Assigned 06/04/2013 (4412 days ago)
Resolved 06/05/2013 (4411 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/05/2013 07:24:34 PM Michael Slusarz Deleted Original Message
 
06/05/2013 07:24:29 PM Michael Slusarz Deleted Original Message
 
06/05/2013 07:24:23 PM Michael Slusarz Deleted Original Message
 
06/05/2013 07:12:47 PM azurit (at) pobox (dot) sk Comment #31 Reply to this comment
Fixed, thanks! Can you, please, remove all attachments as they can 
containt private data? Thank you.
06/05/2013 06:51:30 PM Michael Slusarz Comment #30
State ⇒ Resolved
Reply to this comment
IMP 6.0.6.  It was an issue with using the wrong variable name.  Not 
sure why I wasn't seeing this however.
06/05/2013 06:50:37 PM Git Commit Comment #29 Reply to this comment
Changes have been made in Git (master):

commit ba2f9031f787ba404e0645e42678d3e344cdbccc
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Jun 5 12:48:17 2013 -0600

     [mms] Fix displaying some HTML messages that contain blocked CSS 
rules (Bug #12294).

     Conflicts:
             imp/docs/CHANGES
             imp/package.xml

  imp/docs/CHANGES             |    2 ++
  imp/lib/Mime/Viewer/Html.php |    4 ++--
  2 files changed, 4 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/ba2f9031f787ba404e0645e42678d3e344cdbccc
06/05/2013 06:48:38 PM Git Commit Comment #28 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_0):

commit a61408f869b7f3795e8fba2976c7df9724c476db
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Jun 5 12:48:17 2013 -0600

     [mms] Fix displaying some HTML messages that contain blocked CSS 
rules (Bug #12294).

  imp/docs/CHANGES             |    2 ++
  imp/lib/Mime/Viewer/Html.php |    4 ++--
  imp/package.xml              |    2 ++
  3 files changed, 6 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/a61408f869b7f3795e8fba2976c7df9724c476db
06/05/2013 10:31:18 AM azurit (at) pobox (dot) sk Comment #27 Reply to this comment
06/05/2013 09:05:48 AM azurit (at) pobox (dot) sk Comment #26 Reply to this comment
I got this:
[05-Jun-2013 11:05:00 Europe/Bratislava] PHP Fatal error:  Call to a 
member function appendChild() on a non-object in 
/usr/share/horde/imp/lib/Mime/Viewer/Html.php on line 512
06/05/2013 08:15:05 AM azurit (at) pobox (dot) sk Comment #25 Reply to this comment
This second commit is little strange - i don't have file imp/lib/Images.php.
06/04/2013 11:26:33 PM Git Commit Comment #24 Reply to this comment
Changes have been made in Git (master):

commit c02cf9f512a29f4160bb39e0b54d922b57a69940
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Jun 4 13:02:24 2013 -0600

     [mms] Catch and ignore errors from contacts backend when 
determining whether to show images in a message (Bug #12294).

  imp/docs/CHANGES   |    8 ++++++++
  imp/lib/Images.php |   33 ++++++++++++++++++++-------------
  2 files changed, 28 insertions(+), 13 deletions(-)

http://git.horde.org/horde-git/-/commit/c02cf9f512a29f4160bb39e0b54d922b57a69940
06/04/2013 07:49:44 PM Michael Slusarz Comment #23 Reply to this comment
imp/lib/Mime/Viewer/Html.php

I would trace the code (renderIMP method), putting in breakpoints 
until you reach the point where it doesn't work anymore.
06/04/2013 07:39:09 PM azurit (at) pobox (dot) sk Comment #22 Reply to this comment
Can you give me any hints where should i start? For exampe filenames. 
Thank you.
06/04/2013 07:18:23 PM Michael Slusarz Comment #21 Reply to this comment
You need to trace the code then to find out exactly what is broken for 
you.  I can verify that the CSS parsing code works perfectly for me 
and I can view the message part just fine.
06/04/2013 07:14:25 PM azurit (at) pobox (dot) sk Comment #20 Reply to this comment
This, unfortunately, didn't resolve the problem. Any ideas?
06/04/2013 07:09:52 PM Michael Slusarz Comment #19
State ⇒ Feedback
Reply to this comment
There is nothing wrong with the new CSS code.

The only thing I could reproduce is if the image lookup in Turba was 
broken.  So this patch might help.
06/04/2013 07:02:44 PM Git Commit Comment #18 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_0):

commit 4997624663ad7ab4541c1778877c5652b7247125
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Tue Jun 4 13:02:24 2013 -0600

     [mms] Catch and ignore errors from contacts backend when 
determining whether to show images in a message (Bug #12294).

  imp/docs/CHANGES         |    2 ++
  imp/lib/Ui/Imageview.php |   32 +++++++++++++++++++-------------
  imp/package.xml          |    4 ++--
  3 files changed, 23 insertions(+), 15 deletions(-)

http://git.horde.org/horde-git/-/commit/4997624663ad7ab4541c1778877c5652b7247125
06/04/2013 06:47:03 PM Michael Slusarz Comment #17
Assigned to Michael Slusarz
State ⇒ Assigned
Reply to this comment
OK - there is some sort of difference between Html.php from 6.0.5 
(which doesn't work) and 6.1 (which works).  Which is why I couldn't 
reproduce.
06/04/2013 12:34:05 PM azurit (at) pobox (dot) sk Comment #16 Reply to this comment
I used 'git bisect' and here is the winner:
https://github.com/horde/horde/commit/2b5411859c870bffc70c0aff60ced9d9038b78ec

I also checked if it's correct and copy file 
'imp/lib/Mime/Viewer/Html.php' from 6.0.4 to 6.0.5 and problem 
disappears.
06/04/2013 11:33:42 AM azurit (at) pobox (dot) sk Comment #15 Reply to this comment
I tried to downgrade imp to 6.0.4 and problem disappears. I have all 
packages on newest stable versions so problem must be really directly 
in imp and was introduced in 6.0.5.
06/04/2013 08:54:23 AM azurit (at) pobox (dot) sk Comment #14 Reply to this comment
Ok guys, i was able to find a problem with, at least, debug output.

File: Horde/Imap/Client/Base/Debug.php
Function: _write (at the end of file)

This is at the end of function _write:
         if (substr($msg, -1) == "\n") {
             fwrite($this->_stream, $pre . $msg);
             $this->_buffer = null;
         } else {
             $this->_buffer = $pre . $msg;
         }

Data which are ok goes into the 'if'. The missing part of data is 
going to the 'else'. Looks like the missing part does not have the EOL 
character so IMP is considering it as partial message and is not 
processing it. The same thing is, probably, hapening also when 
displaying the message.
06/04/2013 07:56:05 AM azurit (at) pobox (dot) sk Comment #13 Reply to this comment
I have more and more reports from users, this starts after upgrading 
from 6.0.4 to 6.0.5. Where should i start with debugging?
06/03/2013 09:31:11 PM Michael Slusarz Comment #12 Reply to this comment
Attaching what i got via telnet. I wasn't logging IMAP communication
This is still not useful.  You need to trace why in the Imap Client 
code this text is not being recognized.  I don't care what the actual 
text is.  (E.g. this could be some weird fread() boundary issue, so 
only by debugging the actual code reading the stream in Imap_Client 
are you going to determine the root cause).
06/03/2013 09:08:58 PM azurit (at) pobox (dot) sk Comment #11
New Attachment: data.txt
Reply to this comment
Attaching what i got via telnet. I wasn't logging IMAP communication 
by syslog but directly into the file with:
     'debug' => '/tmp/imp-debug.txt',
     'debug_raw' => true,
in my backends.local.php
06/03/2013 09:01:05 PM Jan Schneider Comment #10 Reply to this comment
And what *is* the data? It's well possible that some data is stripped 
by syslog, if that is your logging backend.
06/03/2013 07:11:31 PM azurit (at) pobox (dot) sk Comment #9 Reply to this comment
Hm, this is strange, i got the data when sending it by telnet. I also 
can see the data in tcpdump when sniffing the communication. They are 
only missing in IMP debug log.
06/03/2013 07:00:06 PM Michael Slusarz Comment #8 Reply to this comment
I tried to install Courier 4.10 and it still doesn't work. The 
interesting it that i'm able to correctly open the message via 
Thunderbird.
This doesn't mean anything.  Thunderbird may use another command to 
get that body part.

As mentioned - I can't reproduce with any of my test servers.  So I 
can't do anything more from this side.

You can try to manually login to your IMAP server (i.e. via telnet) 
and issue these commands and see how it responds:

1 SELECT "INBOX"
2 UID FETCH 404611 (BODY.PEEK[2.2])
06/03/2013 06:28:02 PM azurit (at) pobox (dot) sk Comment #7 Reply to this comment
I tried to install Courier 4.10 and it still doesn't work. The 
interesting it that i'm able to correctly open the message via 
Thunderbird.
06/03/2013 05:54:15 PM Michael Slusarz Comment #6
State ⇒ Not A Bug
Reply to this comment
This is a server bug that can't be worked around (unless new evidence 
can be produced otherwise).  If an IMAP server doesn't provide us with 
required data input, there's nothing we can do and no way to workaround.
06/03/2013 05:18:07 PM Michael Slusarz Comment #5 Reply to this comment
On which version of Courier are you able to reproduce it?
I'm *not* able to reproduce it.  My Courier test VM is running 4.12.0.
06/03/2013 05:16:31 PM azurit (at) pobox (dot) sk Comment #4 Reply to this comment
On which version of Courier are you able to reproduce it? I'm using 
4.8.0. Sholud i contact the Courier author?
06/03/2013 04:58:50 PM Michael Slusarz Comment #3
Priority ⇒ 1. Low
State ⇒ Feedback
Reply to this comment
This appears to be a broken IMAP server.

According to your IMAP log, the request for BODY part 2.2 is returning 
no data, although the server is claiming there should be 2256 octets 
of literal data:

C: 9 UID FETCH 404611 (BODY.PEEK[2.2])
S: * 3983 FETCH (UID 404611 BODY[2.2] {2256}
S: )
S: 9 OK FETCH completed.


I can verify this works for me on my Courier test server:

C: 8 UID FETCH 1 (BODY.PEEK[2.2])
S: * 1 FETCH (UID 1 BODY[2.2] {2256}
S: [LITERAL DATA: 2256 bytes]
S: )
S: 8 OK FETCH completed.
06/03/2013 02:28:39 PM azurit (at) pobox (dot) sk Comment #2
New Attachment: 1370267560.M453632P28419V0000000000000902I0000000006EB8DB5_0.server00,S=9473:2,S
Reply to this comment
Attaching also that message.
06/03/2013 02:28:03 PM azurit (at) pobox (dot) sk Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: imp-debug.txt
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Type ⇒ Bug
Summary ⇒ Cannot open message
Reply to this comment
I'm getting this error when trying to open one specific message:
Error when communicating with the server.

Attaching the IMAP log. Notice that IMP is disconnecting early at the 
end (it usually sends few other commands when opening a message).

Saved Queries