6.0.0-alpha12
6/11/25

[#3371] imap_fetchstructure() fails with Dovecot
Summary imap_fetchstructure() fails with Dovecot
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester ben (at)
Created 01/31/2006 (7071 days ago)
Due
Updated 02/01/2006 (7070 days ago)
Assigned 02/01/2006 (7070 days ago)
Resolved 02/01/2006 (7070 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/01/2006 04:57:34 PM Michael Slusarz State ⇒ Resolved
 
02/01/2006 04:48:15 PM ben Comment #16 Reply to this comment
That fixes it for me.
02/01/2006 04:39:57 PM Michael Slusarz Comment #15
State ⇒ Feedback
Priority ⇒ 3. High
Reply to this comment
I use dovecot/php5 also and see nothing.  But I am also using dovecot 
1.0 (beta I think) - which provides namespace support and fixes some 
issues with flag updating when using an imap proxy among other things. 
  But I digress...



Crap... looking through the code I may have found the problem.  Does 
this commit fix this?

http://lists.horde.org/archives/cvs/Week-of-Mon-20060130/054167.html
02/01/2006 02:53:36 PM ben Comment #14 Reply to this comment
The bug report is not an exact fit, but it's the only google result 
for "php imap_fetchstructure dovecot"



fwiw, I am getting runaway apache processes that use 100% CPU, which 
is described in the bug report.  Memory usage is fine, though.



I spent a number of hours last night trying to figure this thing out, 
and that's all I could find.  (The rest of the time was trying to 
figure out how to get dovecot 0.99.14+ installed without reinstalling 
the whole system...stupid rpm-hell)
02/01/2006 02:37:14 PM Jan Schneider Comment #13 Reply to this comment
None of the issues in that bug report is what I am experiencing.
02/01/2006 02:29:14 PM ben Comment #12 Reply to this comment
I'm using php-4.3.11-1.fc2.4.legacy with dovecot-0.99.13-4.FC2
02/01/2006 10:35:52 AM jan (at) horde (dot) org Comment #10 Reply to this comment
I see this with both PHP4 and 5. Just remove the @ from 
imap_fetchstructure() in line 246 of MailboxCache.php, disable mailbox 
caching, and go to your inbox. The mailbox is displayed fine, but you 
get a warning for every message.
02/01/2006 09:25:58 AM Chuck Hagenbuch Comment #9 Reply to this comment
I don't see it, and I'm using Dovecot. :/



Is everyone seeing the problem using PHP 4? Michael, I know you use 
Dovecot as well, right? Are you on PHP 5? (for the record I'm using 5).
02/01/2006 09:24:28 AM Jan Schneider Assigned to Michael Slusarz
 
02/01/2006 09:24:10 AM Jan Schneider Comment #8
State ⇒ Assigned
Summary ⇒ imap_fetchstructure() fails with Dovecot
Reply to this comment
This *is* a bug in IMP, as this obviously happens to everyone using 
Dovecot at the moment, I see similar issues here too, when using 
Dovecot. And this didn't happen in the past. Maybe we simply trigger a 
bug in Dovecot now, but still, it used to work.
02/01/2006 03:31:34 AM ben Comment #7
State ⇒ Not A Bug
Reply to this comment
:(
02/01/2006 03:29:37 AM ben Comment #6 Reply to this comment
Ok, now I'm at a loss...



I've tracked this problem to IMP_MailboxCache::retrieve() line 246.   
For some reason imap_fetchstructure returns false, instead of the 
expected object.  At that point the pertinent variables are set to the 
following values:



$mailbox: Junk E-mail



$msgids:

array(1) {

   [0]=>

   string(4) "1577"

}



$mask: 16



$_SESSION['imp']['stream']:

resource(50) of type (imap)



$val: 1577



and imap_fetchstructure gives the following warning, and returns bool(false):



Warning: imap_fetchstructure(): No body information available in 
/home/ben/public_html/horde/HEAD/imp/lib/IMAP/MailboxCache.php on line 
253



What really gets me is that when viewing the message, the same 
function call with the same values returns the expected object...



I'm pretty sure this is not a problem with imp/horde at this point, 
and will close the ticket.  But, does anybody have any ideas what 
might be going on?



Oh, and fwiw, when viewing the mailbox listing, I get a bunch of those 
same warnings from imap_fetchstructure (one for each message)
01/31/2006 02:51:30 PM ben Comment #5 Reply to this comment
I just did a bit more troubleshooting:



Same horde installation, pointed at two different IMAP servers.  Works 
fine with courier, doesn't work with dovecot.



I'll keep digging.
01/31/2006 09:05:48 AM Chuck Hagenbuch Comment #4 Reply to this comment
I can't reproduce this either.
01/31/2006 05:33:27 AM Michael Slusarz Comment #3
State ⇒ Feedback
Priority ⇒ 2. Medium
Reply to this comment
Can't reproduce.  Since your index/mailbox values appear to be 
correct, this could only happen because IMAP_MailboxCache::retrieve() 
is not returning the correct information.  If using mailbox caching, 
try deleting the cache data.



I've implemented better error handling for this error in compose.php, 
but obviously that is not the entire solution to this issue.
01/31/2006 04:52:51 AM ben Comment #2 Reply to this comment
Oh, yeah, I forgot to mention, that I get the same behavior from any 
folder, and from any message.
01/31/2006 04:52:07 AM ben Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Queue ⇒ IMP
Summary ⇒ Can't reply, reply-to-list, reply-all, forward, or redirect
Type ⇒ Bug
Reply to this comment
I just updated to the latest HEAD today, and I cannot reply, 
reply-to-list, reply-all, forward, or redirect to any messages.  All I 
get is a blank compose window.  My last checkout was mid-day on Jan 
18, and all was well then.



[client 65.28.163.220] PHP Fatal error:  Call to undefined function:   
getheaderob() in /var/www/portal/horde/imp/compose.php on line 223, 
referer: https://calmit.unl.edu/portal/imp/message.php?index=12213



at line 223, $index == 12213, $thismailbox == 'INBOX', and 
$imp_contents is a pear error with a message == 'Error displaying 
message.'

Saved Queries