-
Notifications
You must be signed in to change notification settings - Fork 237
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
Add JMAP server support #19
Comments
|
This will be a complicated problem because we just got our storage interfaces tied to IMAP. go-imap-sql is tied closely to IMAP too, so it basically can't be reworked for JMAP without actually rewriting it from scratch. |
|
Yeah, I don't think there's a good way to abstract all backends behind a single storage interface. Backends will need to support it. |
|
Existence of https://proxy.jmap.io/ hints that it is possible to map JMAP to IMAP. So, probably, it should not be hard to even create an interface adapter. Like, |
|
I'm slowly getting some pieces together in this repo. |
|
Status update: JMAP is a big complex protocol that is not used by any popular clients and has no server libraries available for Go. IMAP is a big complex but also widespread protocol that is well-known, supported by any email client and has server library available for Go. Some of IMAP disadvantages come from incomplete client implementations, not protocol flaws, as JMAP developers want to convince you. I do not expect wide JMAP adoption in next several years, therefore the decision was made to prioritize improving IMAP implementation. If somebody insists on having JMAP, I recommend looking at Cyrus email server, perhaps write a Go library for its SASL delegation protocol so it could be used with maddy just as easy as Dovecot. |
|
If its helpful in any way, about a year ago I pulled out all the JMAP conversion code from cyrus into a mostly standalone C library, so at least you can convert from a mail envelope into jmap-compatible JSON. I designed it to be something I could use from nodejs (via wasm), but the code compiles to a native library just fine too. (Actually its easier to compile it natively because you can use your system's local copy of libicu). It includes all the tricky parts like encoding headers, creating a small text snippet for preview, attachments and outputting both text and usable HTML for any email. The code is fast enough that cyrus doesn't bother caching the json result - it just stores the raw email envelope and uses this code to convert when an inbox / email is opened through jmap. Its a little bit of a mess - "some assembly required". But if nothing else, it could be helpful for conformance testing of another implementation. https://github.com/josephg/mime-to-jmap To compile it natively, copy/link CMake-native to CMakeLists.txt and build. You might need to change the libicu directory if you aren't on macos. (And if you just want to link the wasm version directly, you can extract that out of the npm module) |
|
It is definitely helpful to have some known-working code to look at. Thanks for your work! |
https://jmap.io/
The text was updated successfully, but these errors were encountered: