Cyrus Jmap support question

Ken Murchison murch at fastmail.com
Tue May 22 11:12:39 EDT 2018


Set the 'debug' option in imapd.conf to 'on' and make sure that your 
syslog config is  logging 'local6' at the debug level.


On 05/22/2018 10:49 AM, Zhivko Vasilev wrote:
>
> Hello Bron, Ken,
>
> To clarify, that I do not use official FastMail server.
> I've built Cyrus sever from https://github.com/cyrusimap/cyrus-imapd
> With JMAP and HTTP/2 support enabled. Assume this is the closest 
> implementation to the JMAP RFC?
>
> Seem the problem is with HTTP/2 settings frame. Client and server 
> exchange their settings frame, but on the first data frame, the server 
> reset the stream with PROTOCOL_ERROR  0x1.
> From the source, I saw that Cyrus uses nghttp2 and they provide sample 
> http/2 server, so I'll try to use it to see what happens.
> So most probably it is a http/2 compatibility issue.
>
> After dig the Cyrus code seems HTTP/2 callback code is located in 
> http_h2.c and there are syslog calls , but cannot make it log.
>
> Thanks a lot,
> Zhivko Vasilev
>
> On Tue, May 22, 2018, at 7:19 AM, Ken Murchison wrote:
>>
>> I am just back home after a holiday.  I will look into this sometime 
>> today or tomorrow after I catch up on other items.
>>
>>
>>
>> On 05/21/2018 01:47 PM, Zhivko Vasilev wrote:
>>> Hello Everyone,
>>>
>>> I hope you can help me.
>>>
>>> I'm implementing a JMAP client and try to use Cyrus as reference server.
>>> Send and Receive via IMAP/SMTP work fine.
>>> But when I try to connect via HTTP/2 , connection is reset by HTTP/2 
>>> reset stream command.
>>>
>>> imapd.log file show only  "starttls: TLSv1.2 with cipher 
>>> ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits new) no authentication"
>>>
>>> My http2 call is POST https:// 
>>> <https://my.ip.address:443/jmap>cyrus.mailtemi.com 
>>> <mailto:u1 at cyrus.mailtemi.com>:443/jmap <https://my.ip.address:443/jmap>
>>> HEADERS:
>>> "accept", "application/json"
>>> "content-type", "application/json"
>>> "Authorization", "base64 encoded user name:pass"
>>> BODY:
>>> {"methodCalls":[["Mailbox/get",{},"#1"]],"using":["jmap-core","jmap-mail"]}
>>>
>>> Is there a way to turn on HTTP log to track what I do incorrectly.
>>>
>>> I tried to track with curl  the server allways reponded with HTTP 
>>> error 301.
>>> The  command I've tried was
>>> "curl --verbose --http2 -X POST \
>>>      -H "Content-Type: application/json" \
>>>      -H "Accept: application/json" \
>>>      --user u1 at cyrus.mailtemi.com <mailto:u1 at cyrus.mailtemi.com>:q \
>>>      -d '[["Mailbox/get", {}, 
>>> "#1"],"using":["jmap-core","jmap-mail"]]' \
>>> http:// <http://35.192.121.94/jmap>35.192.121.94:443 
>>> <https://my.ip.address:443/jmap>/jmap <http://35.192.121.94/jmap>"
>>> returned
>>> * Connected to 35.192.121.94 (35.192.121.94) port 80 (#0)
>>> * Server auth using Basic with user 'u1 at cyrus.mailtemi.com 
>>> <mailto:u1 at cyrus.mailtemi.com>'
>>> > POST /jmap HTTP/1.1
>>> > Host: 35.192.121.94
>>> > Authorization: Basic dTFAY3lydXMubWFpbHRlbWkuY29tOnE=
>>> > User-Agent: curl/7.58.0
>>> > Connection: Upgrade, HTTP2-Settings
>>> > Upgrade: h2c
>>> > HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>>> > Content-Type: application/json
>>> > Accept: application/json
>>> > Content-Length: 61
>>> >
>>> * upload completely sent off: 61 out of 61 bytes
>>> < HTTP/1.1 101 Switching Protocols
>>> < Connection: Upgrade
>>> < Upgrade: h2c
>>> * Received 101
>>> * Using HTTP2, server supports multi-use
>>> * Connection state changed (HTTP/2 confirmed)
>>> * Copying HTTP/2 data in stream buffer to connection buffer after 
>>> upgrade: len=0
>>> * Connection state changed (MAX_CONCURRENT_STREAMS updated)!
>>> < HTTP/2 301
>>> < date: Mon, 21 May 2018 17:36:58 GMT
>>> < location: /jmap/
>>> < vary: Accept-Encoding
>>> < content-length: 0
>>> <
>>> * Connection #0 to host 35.192.121.94 left intact
>>>
>>> Please give me some advice or clue how to track what is the problem.
>>> I'm stuck at this point for two days :(
>>>
>>> Thanks ,
>>> Zhivko Vasilev
>>>
>>
>> -- 
>> Ken Murchison
>> Cyrus Development Team
>> FastMail US LLC
>>
>> Email had 1 attachment:
>>
>>  *
>>     |murch.vcf|
>>       1k (text/x-vcard)
>>
>

-- 
Ken Murchison
Cyrus Development Team
FastMail US LLC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20180522/cf8ce3a0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: murch.vcf
Type: text/x-vcard
Size: 4 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20180522/cf8ce3a0/attachment-0001.vcf>


More information about the Cyrus-devel mailing list