<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hi Thomas,<br></div>
<div><br></div>
<div>Your understanding of the imap / sync relationship is backwards: it's not that sync_server now understands imap-style commands with tags, but rather that imapd can now act as a sync destination.<br></div>
<div><br></div>
<div>Specifically, imapd now supports SYNCAPPLY, SYNCGET and SYNCRESTART commands, which correspond respectively with the APPLY, GET and RESTART commands supported by sync_server.  (You must be authenticated as an admin for these commands to be available.)<br></div>
<div><br></div>
<div>When sync_client connects to the specified port, it doesn't know whether the remote end is a sync_server or an imapd.  The sync_try_imap setting is used to control whether it tries to use IMAP protocol or not.  When set to "yes" (the default), it will send the C01 CAPABILITY as you observed.<br></div>
<div><br></div>
<div> *If the remote end is imapd, this will succeed, and replication will proceed using the IMAP style protocol.  <br></div>
<div>* If the remote end is sync_server, it will return a protocol error (as you observed) since it doesn't support the IMAP protocol.  In this case, sync_client will then fall back to using the CSYNC protocol, and replication will proceed.<br></div>
<div><br></div>
<div>If sync_try_imap is set to "no", then sync_client will not try the IMAP protocol at all -- it will just proceed directly to CSYNC.<br></div>
<div><br></div>
<div>The default setting will support replicating to either sync_server or imapd.  If you don't intend to use imapd for replication, you can speed up the initial connection by disabling sync_try_imap.</div>
<div><br></div>
<div>Cheers,<br></div>
<div><br></div>
<div>ellie</div>
<div><br></div>
<div>On Tue, Jan 31, 2017, at 02:07 AM, Thomas Cataldo via Cyrus-devel wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Hi,<br></div>
<div><br></div>
<div>I have some questions about sync_server protocol regarding the sync_try_imap option.<br></div>
<div><br></div>
<div>When trying a git build of cyrus 3, sync_client begins its dialog with the sync_server with a :<br></div>
<div><br></div>
<div>C01 CAPABILITY<br></div>
<div><br></div>
<div><br></div>
<div>I understand what the answer should be to this capability request, I issue the same command to a cyrus 3 sync_server and here is what I get :<br></div>
<div><br></div>
<div><p><span>root@bm1604:~# telnet localhost 2500</span><br></p><p><span>Trying ::1...</span><br></p><p><span>Trying 127.0.0.1...</span><br></p><p><span>Connected to localhost.</span><br></p><p><span>Escape character is '^]'.</span><br></p><p><span>* SASL PLAIN</span><br></p><p><span>* STARTTLS</span><br></p><p><span>* COMPRESS DEFLATE</span><br></p><p><span>* OK bm1604 Cyrus sync server 3.0.0-rc1-70-gd12e571</span><br></p><p><span>C01 CAPABILITY</span><br></p><p><span>BAD IMAP_PROTOCOL_ERROR Unrecognized command</span><br></p><p><span></span><br></p><p><span>So my question is whether the master branch really supports an imap like variant of the replication protocol. If it does, I would like to know how to enable it.</span><br></p><p><span>What I expect is that with tagged commands, the replication could multiplex some of its operations.</span><br></p><p><span>eg. when 2 mailboxes are changed, it could issue :</span><br></p><p><span>M01 APPLY MAILBOX %(...)</span><br></p><p><span>M02 APPLY MAILBOX %(...)</span><br></p><p><span>without waiting for the response to M01.</span><br></p><p><span></span><br></p><p><span>Regards,</span><br></p><p><span>Thomas.</span><br></p><p><span></span><br></p></div>
</div>
</blockquote><div><br></div>
</body>
</html>