Author Topic: + [0.5.2] Could not load message from server  (Read 6107 times)

Offline MKelma

  • Jr. Member
  • **
  • Posts: 17
+ [0.5.2] Could not load message from server
« on: May 18, 2011, 04:43:44 AM »
hi all!

i got a problem with one single mail that can not be opened in roundcube 0.5.1 and 0.5.2
RC throws error $messages['messageopenerror'] "Could not load message from server" and shows a blank page.
message displays OK when opening in other IMAP clients (e.g. thunderbird)...

when looking at the raw message (on IMAP server) it looks pretty OK to me.
header states, it was composed in EUDORA:
Code: [Select]
X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Tue, 17 May 2011 15:42:49 +0200
To: xxx@yyy.com
From: AAA <aaa@bbb.com>
Subject: Subject-text
Mime-Version: 1.0
Content-Type: multipart/mixed;

there is a PDF attached, which contains sensitive company data, so i can't post the message here :(

can you help me with debugging in RC, since i'm pretty sure, error is on RC side...

the message is triggered at the top of program/steps/mail/show.inc
Code: [Select]
 $MESSAGE = new rcube_message($uid);

  // if message not found (wrong UID)...
  if (empty($MESSAGE->headers)) {
    rcmail_message_error($uid);
  }

so, $MESSAGE->headers must be empty, but why?

regards

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,881
    • SKaero - Custom Roundcube development
+ [0.5.2] Could not load message from server
« Reply #1 on: May 18, 2011, 11:41:10 AM »
Enable imap_debug and post the log.

Offline MKelma

  • Jr. Member
  • **
  • Posts: 17
+ [0.5.2] Could not load message from server
« Reply #2 on: May 18, 2011, 02:22:22 PM »
imap server is "Courier-IMAP 4.9.1"

Code: [Select]

[18-May-2011 20:15:01 +0200]: S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2011 Double Precision, Inc.  See COPYING for distribution information.
[18-May-2011 20:15:01 +0200]: C: A0001 LOGIN user pass
[18-May-2011 20:15:01 +0200]: S: A0001 OK LOGIN Ok.
[18-May-2011 20:15:01 +0200]: C: A0002 SELECT INBOX
[18-May-2011 20:15:01 +0200]: S: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
[18-May-2011 20:15:01 +0200]: S: * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
[18-May-2011 20:15:01 +0200]: S: * 2 EXISTS
[18-May-2011 20:15:01 +0200]: S: * 0 RECENT
[18-May-2011 20:15:01 +0200]: S: * OK [UIDVALIDITY 1235732881] Ok
[18-May-2011 20:15:01 +0200]: S: * OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
[18-May-2011 20:15:01 +0200]: S: A0002 OK [READ-WRITE] Ok
[18-May-2011 20:15:01 +0200]: C: A0003 UID FETCH 2449 (UID RFC822.SIZE FLAGS INTERNALDATE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE LIST-POST DISPOSITION-NOTIFICATION-TO REPLY-TO IN-REPLY-TO CC BCC MESSAGE-ID CONTENT-TRANSFER-ENCODING REFERENCES X-PRIORITY X-DRAFT-INFO MAIL-FOLLOWUP-TO MAIL-REPLY-TO RETURN-PATH)])
[18-May-2011 20:15:01 +0200]: S: * BYE [ALERT] Fatal error: Invalid argument

:confused:

Offline MKelma

  • Jr. Member
  • **
  • Posts: 17
+ [0.5.2] Could not load message from server
« Reply #3 on: May 20, 2011, 05:13:48 AM »
i located the problem - it's caused by a special character (like äöüß) in the attachments filename.
i think it's a bug in the MTA (Eudora for Windows) - i can't believe that unquoted special characters are allowed per RFC ...

Eudora mail, sending attachment named "teßt.zip":
Code: [Select]
Content-Type: application/zip; name=&quot;teßt.zip&quot;;
 x-mac-type=&quot;705A4950&quot;; x-mac-creator=&quot;705A4950&quot;
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=&quot;teßt.zip&quot;


Thunderbird mail, sending attachment named "teßt.zip":
Code: [Select]
Content-Type: application/zip;
 name="=?ISO-8859-15?Q?te=DFt=2Ezip?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename*=ISO-8859-15''%74%65%DF%74%2E%7A%69%70


BUT:
when opening this (maybe non RFC-like) message, only RC triggers an error.
other imap clients can open it without any problems.

so, i think there is a fix needed, that RC can handle such attachments.
any hints on how and where to start?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,881
    • SKaero - Custom Roundcube development
+ [0.5.2] Could not load message from server
« Reply #4 on: May 20, 2011, 11:52:10 AM »
I don't think its a RoundCube bug, if you look at the imap log the server kill the connection before sending the message to RoundCube. You may want to submit a bug ticket on http://trac.roundcube.net/ but I think its most likely a server problem.

Offline MKelma

  • Jr. Member
  • **
  • Posts: 17
+ [0.5.2] Could not load message from server
« Reply #5 on: May 21, 2011, 04:05:20 PM »
but when this message is opened by thunderbird as imap client, everything is fine on this server...

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,881
    • SKaero - Custom Roundcube development
+ [0.5.2] Could not load message from server
« Reply #6 on: May 21, 2011, 06:16:48 PM »
Which is why you could open a ticket on http://trac.roundcube.net/ its possible its sending the wrong parameters in the fetch command, but the fetch command looks alright to me.

Offline MKelma

  • Jr. Member
  • **
  • Posts: 17
+ [0.5.2] Could not load message from server
« Reply #7 on: June 22, 2011, 05:45:01 AM »
updating info on this:

courier-imap-4.9.3 fixes the problem.
from changelog:
Quote
2011-05-22  Sam Varshavchik  
   * msgenvelope.c (msgappends): Fix a fatal error upon encountering
   8-bit header content. Heuristically try to interpret it as UTF-8, and
   just ignore invalid UTF-8 sequences.

2011-05-17  Sam Varshavchik  
   * rfc2045/rfc2045cdecode.c: Tolerate lowercase hexadecimal characters
   in quoted-printable-encoded content.


this still does not explain, why the "malformatted" email is readable in other
IMAP clients, but ... anyway - problem solved
:)