[Tickets #12887] "UID SEARCH": "BAD Invalid Search criteria"

noreply at bugs.horde.org noreply at bugs.horde.org
Sun Dec 22 17:26:56 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12887
------------------------------------------------------------------------------
  Ticket             | 12887
  Created By         | jmozdzen at nde.ag
  Summary            | "UID SEARCH": "BAD Invalid Search criteria"
  Queue              | Horde Framework Packages
  Version            | FRAMEWORK_5_1
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


jmozdzen at nde.ag (2013-12-22 17:26) wrote:

Horde_Imap_Client 2.16.1(please correct queue version if this is *not*  
for 5.1.x, I seem to be unable to identify this from "pear list"  
results)

After some connectivity problem, the ActiveSync client is unable to  
resync with the Horde server when deleting a message. I believe the  
message was deleted on both sides (mobile device, Horde) to cause this  
situation.

The horde log reports an IMAP error when moving the message to the  
Trash folder:

--- cut here: /var/log/horde/horde5.log ---
2013-12-22T17:48:11+01:00 ERR: HORDE [horde] Returning HTTP 500 while  
handling Sync command. [pid 12659 on line 156 of  
"/srv/www/htdocs.www.nde.ag.ssl/horde/rpc.php"]
2013-12-22T17:48:11+01:00 ERR: HORDE [horde] Error in communicating  
with ActiveSync server: Der E-Mail-Server hat einen IMAP-Fehler  
gemeldet. [pid 12659 on line 162 of  
"/usr/share/php5/PEAR/Horde/Rpc/ActiveSync.php"]
2013-12-22T17:48:11+01:00 ERR: HORDE [horde] #0  
/usr/share/php5/PEAR/Horde/Imap/Client/Socket.php(3941):  
Horde_Imap_Client_Socket->_getLine(Object(Horde_Imap_Client_Interaction_Pipeline))
#1 /usr/share/php5/PEAR/Horde/Imap/Client/Socket.php(3871):  
Horde_Imap_Client_Socket->_sendCmdChunk(Object(Horde_Imap_Client_Interaction_Pipeline),  
Array)
#2 /usr/share/php5/PEAR/Horde/Imap/Client/Socket.php(2231):  
Horde_Imap_Client_Socket->_sendCmd(Object(Horde_Imap_Client_Interaction_Pipeline))
#3 /usr/share/php5/PEAR/Horde/Imap/Client/Base.php(2370):  
Horde_Imap_Client_Socket->_search(Object(Horde_Imap_Client_Search_Query),  
Array)
#4 /usr/share/php5/PEAR/Horde/ActiveSync/Imap/Adapter.php(566):  
Horde_Imap_Client_Base->search(Object(Horde_Imap_Client_Mailbox),  
Object(Horde_Imap_Client_Search_Query))
#5 /usr/share/php5/PEAR/Horde/Core/ActiveSync/Driver.php(1170):  
Horde_ActiveSync_Imap_Adapter->moveMessage('INBOX', Array,  
'INBOX/Trash')
#6 /usr/share/php5/PEAR/Horde/ActiveSync/Connector/Importer.php(274):  
Horde_Core_ActiveSync_Driver->moveMessage('INBOX', Array, 'INBOX/Trash')
#7 /usr/share/php5/PEAR/Horde/ActiveSync/Request/Sync.php(1031):  
Horde_ActiveSync_Connector_Importer->importMessageMove(Array,  
'F6937edd4')
#8 /usr/share/php5/PEAR/Horde/ActiveSync/Request/Sync.php(794):  
Horde_ActiveSync_Request_Sync->_parseSyncCommands(Array)
#9 /usr/share/php5/PEAR/Horde/ActiveSync/Request/Sync.php(208):  
Horde_ActiveSync_Request_Sync->_parseSyncFolders()
#10 /usr/share/php5/PEAR/Horde/ActiveSync/Request/Base.php(249):  
Horde_ActiveSync_Request_Sync->_handle()
#11 /usr/share/php5/PEAR/Horde/ActiveSync.php(894):  
Horde_ActiveSync_Request_Base->handle()
#12 /usr/share/php5/PEAR/Horde/Rpc/ActiveSync.php(143):  
Horde_ActiveSync->handleRequest('Sync', 'SEC1EBBAABA7FB1...')
#13 /srv/www/htdocs.www.nde.ag.ssl/horde/rpc.php(156):  
Horde_Rpc_ActiveSync->getResponse(NULL)
#14 {main} [pid 12659 on line 162 of  
"/usr/share/php5/PEAR/Horde/Rpc/ActiveSync.php"]
2013-12-22T17:48:11+01:00 ERR: HORDE [horde] Buffer contents:  [pid  
12659 on line 162 of "/usr/share/php5/PEAR/Horde/Rpc/ActiveSync.php"]
--- cut here ---

The IMAP log shows the subject error:

--- cut here: IMAP log ---
>> Sun, 22 Dec 2013 17:48:10 +0100
S: * OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS AUTH=PLAIN  
SASL-IR] imapserver.somcomany.com  Cyrus IMAP v2.3.13-kolab-nocaps  
server ready
1 [SASL-IR AUTHENTICATE Command - method: PLAIN, username:  
someuser at somecompany.com]
>> CACHE: Using the Horde_Imap_Client_Cache_Backend_Db storage driver.
C: 2 NAMESPACE
S: * NAMESPACE (("INBOX/" "/")) (("user/" "/")) (("" "/"))
S: 2 OK Completed
C: 3 SELECT INBOX (CONDSTORE)
S: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen NonJunk  
$Forwarded $MDNSent Junk KMAILFORWARDED KMAILTODO KMAILWATCHED  
KMAILIGNORED $TODO
S: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen  
NonJunk $Forwarded $MDNSent Junk KMAILFORWARDED KMAILTODO KMAILWATCHED  
KMAILI
S: * 38 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 25]
S: * OK [UIDVALIDITY 1256576950]
S: * OK [UIDNEXT 37902]
S: * OK [HIGHESTMODSEQ 29204]
S: * OK [URLMECH INTERNAL]
S: 3 OK [READ-WRITE] Completed
C: 4 UID STORE 37868 +FLAGS \seen
S: * 22 FETCH (FLAGS (\Seen) MODSEQ (29158) UID 37868)
S: 4 OK Completed
>> CACHE: Stored messages (mailbox: INBOX; UIDs: 37868)
C: 5 LSUB "" INBOX/*
C: 6 LSUB "" user/*
C: 7 LSUB "" *
[...]
S: 7 OK Completed (0.040 secs 649 calls)
C: 8 LIST "" INBOX/*
C: 9 LIST "" user/*
C: 10 LIST "" *
S: * LIST (\HasChildren) "/" "INBOX/subfolder"
[...]
S: 10 OK Completed (0.070 secs 994 calls)
>> SEARCH: Expired from cache (mailbox: INBOX)
C: 11 UID SEARCH UID IGNORESMS_SMS_1387536480986,37870,37873,37872
S: 11 BAD Invalid Search criteria
C: 12 LOGOUT
S: * BYE LOGOUT received
S: 12 OK Completed
--- cut here ---

After resetting the ActiveSync device in Horde, the next resync will work.

The remote client is an Android device (up-to-date Samsung S4) and  
judging from the message above, it seems mentionable that an SMS  
received on the device and displayed by the standard email application  
was deleted on the mobile device, probably causing that  
"IGNORESMS_SMS_1387536480986"of the "uid search" statement.

This is obviously a pretty old IMAP server and I'm preparing an  
upgrade, so if this is hard to fix, please respond with "won't fix".  
But it would help me to cover the next four to eight weeks at least  
and might be probably good to react to this situation some other way  
(or not use that syntax in the first place, for such an old server),  
so it *would* be helpful if a fix was possible. I cannot tell if the  
SMS part is the cause and might affect newer Cyrus IMAP servers, too.

Regards,
Jens





More information about the bugs mailing list