<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>compose/reply malformed header</title> 
  <pubDate>Fri, 10 Apr 2026 00:42:28 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9538</link> 
  <atom:link rel="self" type="application/rss+xml" title="compose/reply malformed header" href="https://bugs.horde.org/ticket/9538/rss" /> 
  <description>compose/reply malformed header</description> 
 
   
   
  <item> 
   <title>Using the attached message, traditional mode,
If I reply to</title> 
   <description>Using the attached message, traditional mode,
If I reply to this message and go back to Inbox, I can&#039;t open the received message nor the sent message, I get the following errors :

2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined index: size [pid 31329 on line 756 of &quot;/var/www/html/hordetest/imp/mailbox.php&quot;]
2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined index: flags [pid 31329 on line 770 of &quot;/var/www/html/hordetest/imp/mailbox.php&quot;]
2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined index: flags [pid 31329 on line 774 of &quot;/var/www/html/hordetest/imp/mailbox.php&quot;]
2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined index: headers [pid 31329 on line 775 of &quot;/var/www/html/hordetest/imp/mailbox.php&quot;]
2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: in_array() expects parameter 2 to be array, null given [pid 31329 on line 47 of &quot;/var/www/html/hordetest/imp/lib/Flag/Imap.php&quot;]
...
2011-01-25T10:06:17+01:00 DEBUG: HORDE [imp] PHP ERROR: in_array() expects parameter 2 to be array, null given [pid 31329 on line 60 of &quot;/var/www/html/hordetest/imp/lib/Flag/System/Unseen.php&quot;]
2011-01-25T10:06:33+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined offset: 8 [pid 31329 on line 2919 of &quot;/var/www/html/hordetest/libs/Horde/Imap/Client/Socket.php&quot;]
...



If I log out and login again using dynamic view, I get the following error when trying to access INBOX :

==&gt; /var/log/httpd/error_log &lt;==
[Tue Jan 25 10:11:03 2011] [error] [client 192.168.1.73] PHP Fatal error:  Call to a member function getValue() on a non-object in /var/www/html/hordetest/imp/lib/Views/ListMessages.php on line 469, referer: http://192.168.1.22/hordetest/imp/
2011-01-25T10:11:03+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined offset: 8 [pid 31329 on line 2919 of &quot;/var/www/html/hordetest/libs/Horde/Imap/Client/Socket.php&quot;]
2011-01-25T10:11:03+01:00 DEBUG: HORDE [imp] PHP ERROR: Undefined offset: 8 [pid 31329 on line 2919 of &quot;/var/www/html/hordetest/libs/Horde/Imap/Client/Socket.php&quot;]
...

</description> 
   <pubDate>Tue, 25 Jan 2011 09:17:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61577</link> 
  </item> 
   
  <item> 
   <title>Clear your cache - looks like it is corrupt for some reason.</title> 
   <description>Clear your cache - looks like it is corrupt for some reason.</description> 
   <pubDate>Tue, 25 Jan 2011 09:57:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61584</link> 
  </item> 
   
  <item> 
   <title>&gt; Clear your cache - looks like it is corrupt for some reaso</title> 
   <description>&gt; Clear your cache - looks like it is corrupt for some reason.

I don&#039;t have cache enabled. 
$servers[&#039;imap&#039;][&#039;cache&#039;] =&gt; false

$conf[&#039;group&#039;][&#039;cache&#039;] = false;
$conf[&#039;share&#039;][&#039;cache&#039;] = false;
$conf[&#039;cache&#039;][&#039;driver&#039;] = &#039;Null&#039;;
$conf[&#039;cachecss&#039;] = false;
$conf[&#039;cachejs&#039;] = false;
$conf[&#039;cachethemes&#039;] = false;
$conf[&#039;sessionhandler&#039;][&#039;memcache&#039;] = false;
$conf[&#039;memcache&#039;][&#039;enabled&#039;] = false;

The header of the sent message doesn&#039;t look right :
To: &quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\&quot;&quot; &lt;rsalmon@mbpgroup.com&gt;

</description> 
   <pubDate>Tue, 25 Jan 2011 12:53:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61587</link> 
  </item> 
   
  <item> 
   <title>&gt; The header of the sent message doesn&#039;t look right :
&gt; To:</title> 
   <description>&gt; The header of the sent message doesn&#039;t look right :
&gt; To: &quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\&quot;&quot; &lt;rsalmon@mbpgroup.com&gt;

There&#039;s nothing technically wrong with this header.  There was a bug in the encoding algorithm (since fixed) that caused the name to be double wrapped in quotes, but that&#039;s a quality of display issue, not a fatal error.</description> 
   <pubDate>Tue, 25 Jan 2011 19:21:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61600</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; The header of the sent message doesn&#039;t look right :
&gt;&gt; T</title> 
   <description>&gt;&gt; The header of the sent message doesn&#039;t look right :
&gt;&gt; To: &quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\&quot;&quot; &lt;rsalmon@mbpgroup.com&gt;
&gt;
&gt; There&#039;s nothing technically wrong with this header.  There was a bug 
&gt; in the encoding algorithm (since fixed) that caused the name to be 
&gt; double wrapped in quotes, but that&#039;s a quality of display issue, not 
&gt; a fatal error.

Ok, I updated from git this morning and indeed, the encoding part is fixed. But (there&#039;s always a but :-) ), If there is nothing technically wrong with this header, then there is a problem with DIMP.

I&#039;ve attached the received message (before the encoding algorithm fix). 

when I click on the folder containing this email, I get :
- DIMP : The server was unable to generate the message list.

- httpd/error_log
[Wed Jan 26 11:35:55 2011] [error] [client 192.168.1.73] PHP Fatal error:  Call to a member function getValue() on a non-object in /var/www/html/hordetest/imp/lib/Views/ListMessages.php on line 469, referer: http://192.168.1.22/hordetest/imp/

- horde.log
see attached file</description> 
   <pubDate>Wed, 26 Jan 2011 10:44:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61607</link> 
  </item> 
   
  <item> 
   <title>No problem here.  My guess is that your IMAP server is choki</title> 
   <description>No problem here.  My guess is that your IMAP server is choking on your message.  You need to provide the IMAP log when viewing that mailbox.

---

To further debug this issue, we need details of the IMP -&gt; IMAP/POP communication.

To enable debugging, see instructions contained in imp/config/servers.php (the &#039;debug&#039; config parameter).  

Debugging should not be enabled on a production server,   Attach/post only the portion of the log that directly deals with the problem reported (it may be simplest to clear the log file and then perform the event that causes the error).</description> 
   <pubDate>Wed, 26 Jan 2011 17:57:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61610</link> 
  </item> 
   
  <item> 
   <title>&gt; No problem here.  My guess is that your IMAP server is cho</title> 
   <description>&gt; No problem here.  My guess is that your IMAP server is choking on 
&gt; your message.  You need to provide the IMAP log when viewing that 
&gt; mailbox.

attached is the IMAP log. 
There is only one email in the folder.</description> 
   <pubDate>Thu, 27 Jan 2011 08:02:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61613</link> 
  </item> 
   
  <item> 
   <title>&gt; attached is the IMAP log.
&gt; There is only one email in th</title> 
   <description>&gt; attached is the IMAP log.
&gt; There is only one email in the folder.

Your IMAP server is broken.

This response is invalid:

(1296114958,4055) S: * 1 FETCH (UID 51 [snip] ((&quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\\&quot; NIL &quot;rsalmon&quot; &quot;mbpgroup.com&quot;)) [snip])

The personal name part resolves to:
&quot;François Xavier. XXXXXX\

The IMAP server is chopping off the trailing quote.  The FETCH response MUST be a literal string (instead of a quoted string) due to the presence of the double quote.  e.g.:

* 1 FETCH (UID 51 [snip] (({45}
=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\&quot;
 NIL &quot;rsalmon&quot; &quot;mbpgroup.com&quot;)) [snip])</description> 
   <pubDate>Thu, 27 Jan 2011 10:01:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61614</link> 
  </item> 
   
  <item> 
   <title>&gt; Your IMAP server is broken.

In Courier version 4.7.0 (a</title> 
   <description>&gt; Your IMAP server is broken.

In Courier version 4.7.0 (according to changelog, looks like nothing substantial has changed to the present version), I get this:

((&quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX&quot; NIL &quot;rsalmon&quot; &quot;mbpgroup.com&quot;))

So it is silently stripping the trailing double quote, which means it is still broken, although in a different way.  However, IMP seems to handle this just fine.

The proper way of quoting this string would be:

((&quot;=?utf-8?b?IkZyYW7Dp29pcw==?= Xavier. XXXXXX\\\&quot;&quot; NIL &quot;rsalmon&quot; &quot;mbpgroup.com&quot;))

Or better yet, use a real server (like dovecot) that does literal quoting the second it sees either a backslash or double quote.</description> 
   <pubDate>Thu, 27 Jan 2011 10:24:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61615</link> 
  </item> 
   
  <item> 
   <title>Not sure if we can catch broken IMAP servers like this witho</title> 
   <description>Not sure if we can catch broken IMAP servers like this without breaking expected behavior.  Since there really is not an easy way for me to debug this, it would be great if you could track down where things are breaking.  Might want to start in IMP_Mailbox_List#getMailboxArray() and work from there (namely, the results from the imp_imap-&gt;fetch() call).</description> 
   <pubDate>Thu, 27 Jan 2011 10:29:16 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61616</link> 
  </item> 
   
  <item> 
   <title>&gt; Or better yet, use a real server (like dovecot) that does </title> 
   <description>&gt; Or better yet, use a real server (like dovecot) that does literal 
&gt; quoting the second it sees either a backslash or double quote.

I guess there are pros and cons for using courier-imap or dovecot :-)</description> 
   <pubDate>Thu, 27 Jan 2011 11:06:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61617</link> 
  </item> 
   
  <item> 
   <title>&gt; Not sure if we can catch broken IMAP servers like this wit</title> 
   <description>&gt; Not sure if we can catch broken IMAP servers like this without 
&gt; breaking expected behavior.  Since there really is not an easy way 
&gt; for me to debug this, it would be great if you could track down where 
&gt; things are breaking.  Might want to start in 
&gt; IMP_Mailbox_List#getMailboxArray() and work from there (namely, the 
&gt; results from the imp_imap-&gt;fetch() call).

Since we are using an old version (4.3.0) I&#039;ll try first to update courier-imap, but not easy to do on a production server since updating courier-imap means updating other packages. 
And if this is an issue with courier-imap, I should try to get the courier-imap guys to fix this.

Nevertheless, I&#039;ll try to debug as you described above.

</description> 
   <pubDate>Thu, 27 Jan 2011 11:10:01 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61618</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Your IMAP server is broken.
&gt;
&gt; In Courier version 4.7.</title> 
   <description>&gt;&gt; Your IMAP server is broken.
&gt;
&gt; In Courier version 4.7.0 (according to changelog, looks like nothing 
&gt; substantial has changed to the present version), I get this:

I was using 4.3.0. I&#039;ve justed updated to  4.8.1. Works like a charm :-) I&#039;m hoping that everything will be Ok tomorrow morning...

The following courier-imap fix probably did it :

 2008-06-13  Mr. Sam  &lt;mrsam@courier-mta.com&gt;
        * rfc822_getaddr.c: Backslashed special characters in address names
        weren&#039;t being dequoted correctly by rfc822_getname() and
        rfc822_getname_orlist().

We probably ran into this problem before but I&#039;m guessing all end user software always handled this issue silently. This includes older IMP. Amazing!

I won&#039;t be able to debug this anymore (Although I tried this afternoon, I got nowhere).

</description> 
   <pubDate>Thu, 27 Jan 2011 21:25:12 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61642</link> 
  </item> 
   
  <item> 
   <title>There still is an *small* issue with this message.
using DI</title> 
   <description>There still is an *small* issue with this message.
using DIMP, if I reply to all (or just sender), the &quot;To&quot; filed is never automatically completed.
</description> 
   <pubDate>Thu, 27 Jan 2011 21:27:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61643</link> 
  </item> 
   
  <item> 
   <title>&gt; We probably ran into this problem before but I&#039;m guessing </title> 
   <description>&gt; We probably ran into this problem before but I&#039;m guessing all end 
&gt; user software always handled this issue silently. This includes older 
&gt; IMP. Amazing!

This probably means that we rebuild the message data differently than other software.  I would still like to find where this happens, if possible, since Horde/IMP should work (as much as possible) with garbage input.
</description> 
   <pubDate>Fri, 28 Jan 2011 17:15:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61665</link> 
  </item> 
   
  <item> 
   <title>&gt; There still is an *small* issue with this message.
&gt; usin</title> 
   <description>&gt; There still is an *small* issue with this message.
&gt; using DIMP, if I reply to all (or just sender), the &quot;To&quot; filed is 
&gt; never automatically completed.

Works for me.  Might not be working for you since you would be replying to yourself.
</description> 
   <pubDate>Fri, 28 Jan 2011 20:14:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61667</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; There still is an *small* issue with this message.
&gt;&gt; us</title> 
   <description>&gt;&gt; There still is an *small* issue with this message.
&gt;&gt; using DIMP, if I reply to all (or just sender), the &quot;To&quot; filed is
&gt;&gt; never automatically completed.
&gt;
&gt; Works for me.  Might not be working for you since you would be 
&gt; replying to yourself.
Yes, this is the case. I got misled since the user name is displayed and not the email address (which was mine).
</description> 
   <pubDate>Sat, 29 Jan 2011 15:43:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61671</link> 
  </item> 
   
  <item> 
   <title>&gt; This probably means that we rebuild the message data diffe</title> 
   <description>&gt; This probably means that we rebuild the message data differently than 
&gt; other software.  I would still like to find where this happens, if 
&gt; possible, since Horde/IMP should work (as much as possible) with 
&gt; garbage input.

I&#039;ve managed to install courier-imap-4.3.0 on an old server, and I can reproduce this issue with the messages attached to this ticket.

Can you try with courier-imap-4.3.0 and see if you can reproduce the errors ? If not, then I&#039;ll try to debug further.
</description> 
   <pubDate>Mon, 31 Jan 2011 09:13:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61688</link> 
  </item> 
   
  <item> 
   <title>&gt; Can you try with courier-imap-4.3.0 and see if you can rep</title> 
   <description>&gt; Can you try with courier-imap-4.3.0 and see if you can reproduce the 
&gt; errors ? If not, then I&#039;ll try to debug further.

I can reproduce.  The problem is that the parsing of the envelope entry is broken.  Instead of finding 10 fields, it only parses 5 (because the quote is not closed).  This results in various data entries not existing even though the API guarantees they should be available.

There will never be a way to properly parse this entry - all fields after the bad field will be garbage.  But the code should be able to handle this more gracefully - by defaulting to blank entries for example.  This is going to take a bit of work; my current thinking is we should be returning objects from the IMAP library fetch() call and deal with the issue of bad data when accessing the object properties.</description> 
   <pubDate>Tue, 01 Feb 2011 21:22:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61703</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9538: E</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9538: Envelope data now returned in an object.

 create mode 100644 framework/Imap_Client/lib/Horde/Imap/Client/Data/Envelope.php
http://git.horde.org/horde-git/-/commit/5350fa93016e7698bfd09485ff649e2ef88785ac</description> 
   <pubDate>Fri, 18 Feb 2011 22:39:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61851</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9538: A</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9538: Add Horde_Imap_Client_Fetch_Query
Provides an OO-based way of creating a query, rather than relying on
complex array configuration rules.

 create mode 100644 framework/Imap_Client/lib/Horde/Imap/Client/Fetch/Query.php
http://git.horde.org/horde-git/-/commit/59d11b153a16de754edbcffb426c52324e4c17f3</description> 
   <pubDate>Fri, 18 Feb 2011 22:39:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61852</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug #9538: A</title> 
   <description>Changes have been made in Git for this ticket:

Bug #9538: Add Horde_Imap_Client_Ids and Horde_Imap_Client_Data_Fetch
Now, bad data returned from an IMAP server will never cause failure
since every fetch return entry has automatic default values returned.

Additionally, using objects/IDs like this vastly improves the API by
removing complex array configurations and reducing the number of
parameters.

Side benefit: ALL literal data returned from the IMAP server is now
stored internally as streams - it is auto-converted to a string as
needed.

 create mode 100644 framework/Imap_Client/lib/Horde/Imap/Client/Data/Fetch.php
 create mode 100644 framework/Imap_Client/lib/Horde/Imap/Client/Ids.php
http://git.horde.org/horde-git/-/commit/0224531ec7ab9062c8935f076bb82becb4d5996f</description> 
   <pubDate>Fri, 18 Feb 2011 22:39:24 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61853</link> 
  </item> 
   
  <item> 
   <title>Fixed.  Required a rewrite of the way we handled fetch data </title> 
   <description>Fixed.  Required a rewrite of the way we handled fetch data in the IMAP client.  Considering this is about 75% of the activity of an IMAP client, this was not a small undertaking.

Not super excited about rewriting a good portion of the IMAP client a couple of months before we release H4, but this issue was a showstopper.  Broken IMAP servers, which exist and over which we have no control, could render a IMP user completely unusable.  That was unacceptable.  Now, the user may get garbage for certain elements of the message if the IMAP server is broke, but the message is viewable/deletable and it doesn&#039;t break the underlying mailbox.</description> 
   <pubDate>Fri, 18 Feb 2011 22:43:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61855</link> 
  </item> 
   
  <item> 
   <title>&gt; Fixed.  Required a rewrite of the way we handled fetch dat</title> 
   <description>&gt; Fixed.  Required a rewrite of the way we handled fetch data in the 
&gt; IMAP client.  Considering this is about 75% of the activity of an 
&gt; IMAP client, this was not a small undertaking.

I confirmed that IMP is working with this buggy message using courier-imap 4.3.0 and 4.8.1.
</description> 
   <pubDate>Mon, 21 Feb 2011 08:48:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9538#t61886</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
