-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMAP: Need to make it an error to enable JMAP without conversations #2627
Comments
Do you have conversations enabled? It's required for JMAP but we may not have set up the sanity tests correctly.
Bron.
On Tue, Jan 15, 2019, at 09:37, Jason Munro wrote:
Hello!
I'm working on adding JMAP support to my webmail client and running into a problem trying to use Email/get. Surely I'm doing something incorrectly here, if anyone can point me in the right direction it would be much appreciated!
I'm running a git checkout of Cyrus-imapd from last Friday, coupled with the SASL auth daemon from Debian unstable. I have a functional user account and IMAP access is working fine. I used my client to copy 3 message from another account into my Cyrus INBOX (so IMAP APPEND) and can interact with them normally over IMAP. However when I attempt to use Email/query followed by Email/get, query returns 3 ids, but no details are returned from get, and the ids are always in "notFound".
Email/query request:
`POST /jmap/ HTTP/1.1
Host: localhost:8080
User-Agent: hm3
Authorization: Basic ...
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Accept: application/json
Content-Length: 294
{"using":["urn:ietf:params:jmap:core","urn:ietf:params:jmap:mail"],"methodCalls":[["Email\/query",{"accountId":"testuser","filter":{"inMailbox":"77125b4f-d681-457f-b50e-3e1089e12d2e"},"sort":[{"property":"receivedAt","isAscending":false}],"position":0,"limit":50,"calculateTotal":true},"gmp"]]}
`
Email/query response:
`HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 22:25:16 GMT
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
Content-Length: 406
{"methodResponses":[["Email/query",{"filter":{"inMailbox":"77125b4f-d681-457f-b50e-3e1089e12d2e"},"sort":[{"property":"receivedAt","isAscending":false}],"queryState":"0:0","canCalculateChanges":true,"position":0,"total":3,"ids":["M4acc72ada8f71b88d8cbea69","M87a8f1e3237f8af3baaa3b83","M8c46aaf0eec94d087e123d3e"],"collapseThreads":false,"isCached":false,"accountId":"testuser"},"gmp"]],"sessionState":"0"}
`
Email/get request using the ids from query:
`POST /jmap/ HTTP/1.1
Host: localhost:8080
User-Agent: hm3
Authorization: Basic ...
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Accept: application/json
Content-Length: 274
{"using":["urn:ietf:params:jmap:core","urn:ietf:params:jmap:mail"],"methodCalls":[["Email\/get",{"accountId":"testuser","ids":["M4acc72ada8f71b88d8cbea69","M87a8f1e3237f8af3baaa3b83","M8c46aaf0eec94d087e123d3e"],"properties":["subject"],"bodyProperties":["partId"]},"gml"]]}
`
Email/get response with notFound:
`HTTP/1.1 200 OK
Date: Mon, 14 Jan 2019 22:26:48 GMT
Vary: Accept-Encoding
Content-Type: application/json; charset=utf-8
Content-Length: 204
{"methodResponses":[["Email/get",{"state":"0","list":[],"notFound":["M4acc72ada8f71b88d8cbea69","M87a8f1e3237f8af3baaa3b83","M8c46aaf0eec94d087e123d3e"],"accountId":"testuser"},"gml"]],"sessionState":"0"}
`
Syslog has the following when this occurs:
`Jan 14 16:28:44 shop cyrus/http[609]: jmap: Email/get(M4acc72ada8f71b88d8cbea69): Item does not exist
Jan 14 16:28:44 shop cyrus/http[609]: jmap: Email/get(M87a8f1e3237f8af3baaa3b83): Item does not exist
Jan 14 16:28:44 shop cyrus/http[609]: jmap: Email/get(M8c46aaf0eec94d087e123d3e): Item does not exist
`
… Any help is appreciated! Thank you for your time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#2627>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABE7Qzd1pD0lfiUANOiNTBSQCo6vVZcks5vDQazgaJpZM4Z_4g6>.
--
Bron Gondwana, CEO, FastMail Pty Ltd
[email protected]
|
I did not, thanks for the suggestion. I enabled it, cleared out the existing test messages, copied in some new ones, and voila, it's working great now. THANK YOU! |
Thanks for confirming, I'll get JMAP endpoint updated to return an error saying that conversations are needed to support JMAP.
…On Tue, Jan 15, 2019, at 18:36, Jason Munro wrote:
> Do you have conversations enabled? It's required for JMAP but we may not have set up the sanity tests correctly.
I did not, thanks for the suggestion. I enabled it, cleared out the existing test messages, copied in some new ones, and voila, it's working great now. THANK YOU!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#2627 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AABE7VookbpxThjDXYrwH6vFSXjbhHpTks5vDYUXgaJpZM4Z_4g6>.
--
Bron Gondwana, CEO, FastMail Pty Ltd
[email protected]
|
brong
changed the title
JMAP: Message ids always returning in "notFound" for Email/get
JMAP: Need to make it an error to enable JMAP without conversations
Feb 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I'm working on adding JMAP support to my webmail client and running into a problem trying to use Email/get. Surely I'm doing something incorrectly here, if anyone can point me in the right direction it would be much appreciated!
I'm running a git checkout of Cyrus-imapd from last Friday, coupled with the SASL auth daemon from Debian unstable. I have a functional user account and IMAP access is working fine. I used my client to copy 3 message from another account into my Cyrus INBOX (so IMAP APPEND) and can interact with them normally over IMAP. However when I attempt to use Email/query followed by Email/get, query returns 3 ids, but no details are returned from get, and the ids are always in "notFound".
Email/query request:
Email/query response:
Email/get request using the ids from query:
Email/get response with notFound:
Syslog has the following when this occurs:
Any help is appreciated! Thank you for your time.
The text was updated successfully, but these errors were encountered: