cant deserialize json served by stalwart-jmap #197

Closed
opened 2022-10-29 18:36:19 +03:00 by landry · 2 comments

i'm toying with stalwart-jmap & meli, managed to create an account & import mails in it, but when i direct meli to it, it fetches mails but fails to parse them

jmap: could not fetch mailbox BUG: Could not deserialize server JSON               _response properly, please report this! 
Reply from server: ["Email/get",{"accountId":"d","state":"sei","list":[{"id":"uaaaaaa","blobId":"bfetdkserp0fu2mahvdj0nlw3ya2f7owox7a07yo9rafkeuzw3cya","threadId":"f","mailboxIds":{"a":true},"keywords":{"old":tr││_de Raadt","email":"deraadt@do-not-reply.openbsd.org"}],"to":null,"cc":null,"bcc":null,"replyTo":null,"subject":"Welcome om":[{"name":"Theo                                                               _to OpenBSD 6.0!","sentAt":null,"hasAttachment":false,"preview":"This               _message attempts to describe the most basic initial questions that a\nsystem       _administrator of an OpenBSD box might have.  You are urged to save\nthis           _message for later reference.\n\nFor more information on how to set up your OpenBSD system, refer to th...","bodyValues":{},"textBody":[{"partId":"0","blobId":"hfetdkserp0fu2mahvdj0nlw3ya2f7owox7a07yo9rafkeuzw3cyj2ambei","size":4353,"name":null,"type":"text/plain","charset":"us-as_Root","email":"root@c64.proxmox2"}],"to":[{"name":null,"email":"root@c64.proxmox2"}],"cc":null,"bcc":null,"replyTo":null,"subject":"c64.proxmox2 rafkeuzw3cyj2ambei","size":4353,"name":null,"type":"text/plain","││_rc.sysmerge output","sentAt":"2017-01-31T20:50:50Z","hasAttachment":false,"preview":"===> ments":[]},{"id":"2aaaaab","blobId":"bzuiqbzlupti9oudpgos7nog3np71n2dakkmt9eixuv0ecuvq3mga","threadId":"h","mailboxIds":
Adding the wobj group\n===> Adding the _switchd group\n===> Adding the 21:50:50Z","messageId":["810c635f6dd3a68a@c64.proxmox2"],"inReplyTo":null,"references":null,"sender":null,"from":[{"name":"Charlie __traceroute group\n===> Adding the _ping group\n===> Adding the _syspatch                                                                                                                                         │
│_group\n===> Adding the build user\n===> Adding the _switchd user\n===>

sorry for the paste, that's mostly garbage displayed as is on the term in tmux?? nothing personal in the mail, that's a default email received by root in a new openbsd install.

putting an nginx proxy in-between to figure out what's requests are done i see this:

10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "GET /.well-known/jmap HTTP/1.1" 200 1958 "-" "curl/7.85.0 isahc/1.7.2"
10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "POST /jmap/ HTTP/1.1" 200 1880 "-" "curl/7.85.0 isahc/1.7.2"
10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "POST /jmap/ HTTP/1.1" 200 229 "-" "curl/7.85.0 isahc/1.7.2"
10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:47 +0200] "POST /jmap/ HTTP/1.1" 200 34012 "-" "curl/7.85.0 isahc/1.7.2"
10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:47 +0200] "POST /jmap/ HTTP/1.1" 200 482 "-" "curl/7.85.0 isahc/1.7.2"

meli config below:

[accounts."jmap"]
root_mailbox = "INBOX"
format = "jmap"
server_url="http://jmap.test:8081"
server_password="password"
server_username="user@jmap.test"
identity = "user@jmap.test"
[composing]
send_mail = '/usr/bin/false'

[log]
maximum_level = 'TRACE'

willing to help debugging this, i'm attaching:

  • script(1) output of all the debugging junk sent on stderr with a debug build, including terminal formatting chars
  • can also provide wireshark trace
i'm toying with stalwart-jmap & meli, managed to create an account & import mails in it, but when i direct meli to it, it fetches mails but fails to parse them ``` jmap: could not fetch mailbox BUG: Could not deserialize server JSON _response properly, please report this! Reply from server: ["Email/get",{"accountId":"d","state":"sei","list":[{"id":"uaaaaaa","blobId":"bfetdkserp0fu2mahvdj0nlw3ya2f7owox7a07yo9rafkeuzw3cya","threadId":"f","mailboxIds":{"a":true},"keywords":{"old":tr││_de Raadt","email":"deraadt@do-not-reply.openbsd.org"}],"to":null,"cc":null,"bcc":null,"replyTo":null,"subject":"Welcome om":[{"name":"Theo _to OpenBSD 6.0!","sentAt":null,"hasAttachment":false,"preview":"This _message attempts to describe the most basic initial questions that a\nsystem _administrator of an OpenBSD box might have. You are urged to save\nthis _message for later reference.\n\nFor more information on how to set up your OpenBSD system, refer to th...","bodyValues":{},"textBody":[{"partId":"0","blobId":"hfetdkserp0fu2mahvdj0nlw3ya2f7owox7a07yo9rafkeuzw3cyj2ambei","size":4353,"name":null,"type":"text/plain","charset":"us-as_Root","email":"root@c64.proxmox2"}],"to":[{"name":null,"email":"root@c64.proxmox2"}],"cc":null,"bcc":null,"replyTo":null,"subject":"c64.proxmox2 rafkeuzw3cyj2ambei","size":4353,"name":null,"type":"text/plain","││_rc.sysmerge output","sentAt":"2017-01-31T20:50:50Z","hasAttachment":false,"preview":"===> ments":[]},{"id":"2aaaaab","blobId":"bzuiqbzlupti9oudpgos7nog3np71n2dakkmt9eixuv0ecuvq3mga","threadId":"h","mailboxIds": Adding the wobj group\n===> Adding the _switchd group\n===> Adding the 21:50:50Z","messageId":["810c635f6dd3a68a@c64.proxmox2"],"inReplyTo":null,"references":null,"sender":null,"from":[{"name":"Charlie __traceroute group\n===> Adding the _ping group\n===> Adding the _syspatch │ │_group\n===> Adding the build user\n===> Adding the _switchd user\n===> ``` sorry for the paste, that's mostly garbage displayed as is on the term in tmux?? nothing personal in the mail, that's a default email received by root in a new openbsd install. putting an nginx proxy in-between to figure out what's requests are done i see this: ``` 10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "GET /.well-known/jmap HTTP/1.1" 200 1958 "-" "curl/7.85.0 isahc/1.7.2" 10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "POST /jmap/ HTTP/1.1" 200 1880 "-" "curl/7.85.0 isahc/1.7.2" 10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:46 +0200] "POST /jmap/ HTTP/1.1" 200 229 "-" "curl/7.85.0 isahc/1.7.2" 10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:47 +0200] "POST /jmap/ HTTP/1.1" 200 34012 "-" "curl/7.85.0 isahc/1.7.2" 10.0.2.2 - user@jmap.test [29/Oct/2022:17:27:47 +0200] "POST /jmap/ HTTP/1.1" 200 482 "-" "curl/7.85.0 isahc/1.7.2" ``` meli config below: ``` [accounts."jmap"] root_mailbox = "INBOX" format = "jmap" server_url="http://jmap.test:8081" server_password="password" server_username="user@jmap.test" identity = "user@jmap.test" [composing] send_mail = '/usr/bin/false' [log] maximum_level = 'TRACE' ``` willing to help debugging this, i'm attaching: - script(1) output of all the debugging junk sent on stderr with a debug build, including terminal formatting chars - can also provide wireshark trace

using wireshark i have a hard time finding the packets that contain the replies since they're split between multiple reassembled packets, but here's a try..

using wireshark i have a hard time finding the packets that contain the replies since they're split between multiple reassembled packets, but here's a try..

Closing this, stalwar-jmap works as of 6280bc75e5

Closing this, stalwar-jmap works as of 6280bc75e550332a73c1a51dd46475cd54cc0a34
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: meli/meli#197
There is no content yet.