6.0.0-beta1
8/12/25

[#11612] Broken imap fetch query
Summary Broken imap fetch query
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners slusarz (at) horde (dot) org
Requester mrubinsk (at) horde (dot) org
Created 10/31/2012 (4668 days ago)
Due
Updated 10/31/2012 (4668 days ago)
Assigned 10/31/2012 (4668 days ago)
Resolved 10/31/2012 (4668 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/31/2012 11:17:33 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit a652276d33692a776c13ed9f8efaf65e3c2f7680
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Oct 31 17:13:37 2012 -0600

     If, for some reason, we have MODSEQ but not UIDs, sync anyway

     See, e.g., Ticket #11612 - if a custom cache driver is created that only
     stores MODSEQ information, this will allow mailbox to be sync'd and the
     SYNCMODSEQ, SYNCFLAGUIDS, and SYNCVANISHED status items to be populated.

  .../Imap_Client/lib/Horde/Imap/Client/Base.php     |   43 
++++++++++----------
  .../Imap_Client/lib/Horde/Imap/Client/Socket.php   |   11 +++--
  2 files changed, 27 insertions(+), 27 deletions(-)

http://git.horde.org/horde-git/-/commit/a652276d33692a776c13ed9f8efaf65e3c2f7680
10/31/2012 11:07:59 PM Michael Slusarz Comment #5
State ⇒ Resolved
Reply to this comment

[Show Quoted Text - 13 lines]
IIRC, you are not using Imap_Client's built-in caching?  If no, then 
these don't do anything for you (since QRESYNC/CONDSTORE isn't syncing 
on mailbox open).

But see Ticket #11590 - If not using Imap_Client's full caching, there 
is still an opportunity to take advantage of this.  Namely: creating a 
custom cache driver that has the known MODSEQ value that can be 
returned from it.  The mailbox will be sync'd on open, and the flag 
values can be cached in the custom cache driver so that 
SYNCFLAGUIDS/VANISHED doesn't need to hit the server again (the custom 
cache driver could be an in-memory cache).

I'm probably going to change the internals of Imap_Client soon so that 
all objects cache - if not given a cache parameter, than FETCH items 
are only cached for that page access.  However, this won't take 
advantage of the fact that you have a MODSEQ value/saved state before 
even connecting to the mailbox.
10/31/2012 10:31:54 PM Michael Rubinsky Comment #4 Reply to this comment
This should fix.  Not used anywhere in imp, so I am assuming this is 
activesync code
Yes, this is activesync.
FYI: depending on what you are doing with this return, it may be 
much faster to use STATUS_SYNCFLAGUIDS and/or STATUS_SYNCVANISHED 
instead - if using Imap_Client's cache, this methods eliminate 1-2 
calls to the remote server.
Thanks for the tip. At the point in the code where this is (was) 
happening, I need to know about new/changed messages as well as 
vanished messages. For the changed messages I need the actual state of 
any flags so I don't think I can use the STAUS_SYNCFLAGUIDS. I might 
be able to make use of the STATUS_SYNCVANISHED value, as well as tweak 
other parts of the code where I am only "pinging" the server to check 
for the existence of a change without needed to know what the change is.
10/31/2012 06:43:48 PM Michael Slusarz Comment #3
State ⇒ Feedback
Priority ⇒ 2. Medium
Reply to this comment
This should fix.  Not used anywhere in imp, so I am assuming this is 
activesync code

FYI: depending on what you are doing with this return, it may be much 
faster to use STATUS_SYNCFLAGUIDS and/or STATUS_SYNCVANISHED instead - 
if using Imap_Client's cache, this methods eliminate 1-2 calls to the 
remote server.
10/31/2012 06:43:42 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 4526b530db4352a0ff853ba5a93686f7f889e7dc
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Wed Oct 31 12:43:26 2012 -0600

     Bug #11612: Fix setting data in fetch results object

  .../Imap_Client/lib/Horde/Imap/Client/Base.php     |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/4526b530db4352a0ff853ba5a93686f7f889e7dc
10/31/2012 02:14:19 PM Michael Rubinsky Assigned to Michael Slusarz
State ⇒ Assigned
 
10/31/2012 02:13:59 PM Michael Rubinsky Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Horde Framework Packages
Summary ⇒ Broken imap fetch query
Type ⇒ Bug
Priority ⇒ 3. High
Reply to this comment
2012-10-31 10:03:13: (mod_fastcgi.c.2701) FastCGI-stderr: PHP Fatal 
error:  Call to undefined method 
Horde_Imap_Client_Fetch_Results::merge() in 
/usr/local/horde/horde/framework/Imap_Client/lib/Horde/Imap/Client/Base.php on 
line 2613

Saved Queries