<?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>AS: Transition to MODSEQ enabled IMAP server</title> 
  <pubDate>Fri, 10 Apr 2026 19:28:24 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/12941</link> 
  <atom:link rel="self" type="application/rss+xml" title="AS: Transition to MODSEQ enabled IMAP server" href="https://bugs.horde.org/ticket/12941/rss" /> 
  <description>AS: Transition to MODSEQ enabled IMAP server</description> 
 
   
   
  <item> 
   <title>Hi,

I finally transitioned to a MODSEQ-enabled IMAP serve</title> 
   <description>Hi,

I finally transitioned to a MODSEQ-enabled IMAP server. The cached &quot;collection&quot; data is still from the old non-MODSEQ based cyrus server.

Since the transition, the phones won&#039;t sync new IMAP messages until I reset the collection.
Here&#039;s the relevant log:

----------------------------
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177] Initializing message diff engine for 0270adeb (INBOX)
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177] Using SYNCSTAMP 1390988247 for 0270adeb.
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177] Horde_Core_ActiveSync_Driver::getServerChanges(INBOX, 1390806313, 1390988247, 1389778647, 0)
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177] MODSEQ: 0                       &lt;-- this is $folder-&gt;modseq()
----------------------------

Let&#039;s take a look at Imap/Adapter.php::getMessageChanges() with
    $folder-&gt;modseq(): 0
   $modseq: 102

The current code does not handle this case as the non-CONDSTORE sync code path
tests &quot;if ($modseq == 0)&quot;.

We also can&#039;t change that last condition to &quot;if ($modseq == 0 || $folder-&gt;modseq() == 0)&quot; since
the array data layout of $messages or $flags in Folder/Imap.php is different for the non-MODSEQ / MODSEQ mode -&gt; we might end up with trashed data structures.

Right now I think it&#039;s best we should detect the transition and throw a Horde_ActiveSync_Exception_StaleState exception.

Thoughts?
</description> 
   <pubDate>Wed, 29 Jan 2014 10:31:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12941#t82174</link> 
  </item> 
   
  <item> 
   <title>Tested proof of concept patch.
</title> 
   <description>Tested proof of concept patch.
</description> 
   <pubDate>Wed, 29 Jan 2014 11:17:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12941#t82176</link> 
  </item> 
   
  <item> 
   <title>Partial ActiveSync log file after applying the patch.
</title> 
   <description>Partial ActiveSync log file after applying the patch.
</description> 
   <pubDate>Wed, 29 Jan 2014 11:18:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12941#t82177</link> 
  </item> 
   
  <item> 
   <title>Looks good.

I considered something like this but didn&#039;t t</title> 
   <description>Looks good.

I considered something like this but didn&#039;t think it unreasonable to require state reset when doing something as drastic as changing out the imap server. Since it&#039;s such a simple patch though, no reason to not include it.

Thanks.</description> 
   <pubDate>Wed, 29 Jan 2014 15:49:42 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12941#t82179</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit 5d55e8b18705</title> 
   <description>Changes have been made in Git (master):

commit 5d55e8b1870518b54e8aa537c2d33dfcee877678
Author: Thomas Jarosch &lt;thomas.jarosch@intra2net.com&gt;
Date:   Wed Jan 29 12:13:03 2014 +0100

    Fix transition to MODSEQ-enabled IMAP server. Bug #12941

 .../lib/Horde/ActiveSync/Imap/Adapter.php          |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/5d55e8b1870518b54e8aa537c2d33dfcee877678</description> 
   <pubDate>Fri, 31 Jan 2014 16:06:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12941#t82222</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
