-
Notifications
You must be signed in to change notification settings - Fork 164
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
Cypht Webmail (aggregator): Add JMAP support (as an alternative to IMAP + SMTP) and permit unified inbox (and even move or copy emails from one account to another) #180
Comments
Thanks for the feedback. I have heard of jmap before, and briefly reviewed it a while back, but I'm not super familiar with the specification. Could be a cool addition to Cypht as either a stand alone module set or as part of the imap modules. |
Super! Someone else asked me "Who uses or supports it?" My answer copied below: Cyrus IMAP and Apache James are the notable ones here: http://jmap.io/software.html OpenPaaS is an open source Entreprise Social Platform which is led by LINAGORA (which has more than 150 employees) OpenPaaS is using Apache James. And you can see JMAP used in the code: In this video: https://www.youtube.com/watch?v=2QZIi3EO6rQ , Benoit Tellier explains why they decided to invest in James and JMAP (among other things). LINAGORA has 5 full time employees which are devoted to the project. Why LINAGORA picked JMAP: FastMail started this initiative: Roundcube Next will support JMAP as well. Thanks! |
Thanks for that info. I took another peek at the JMAP spec after you submitted this. Looks like a pretty straight forward rest-style api. Cypht was designed to aggregate data from different sources, so a lot of the work of uncoupling from a particular api or protocol is baked in already. Having worked with the IMAP protocol for 15+ years, I understand more than most why something like JMAP is needed :) I think it differs enough from IMAP that it would make sense to create a stand alone module set (also the IMAP module set is already a tremendous amount of code). I can't promise I will get to this real soon, but I am intrigued. I suspect initial support for this would entail a similar amount of work that the Github module set took - I also suspect we could abstract various bits of the existing IMAP code where the two protocols might overlap. |
Dear Jason, Now is a good time to start the implementation: Thanks!!! |
@marclaporte how I see it, the most important information is, that during the upcoming weeks/months, JMAP will finally become an IETF standard. Which is a huge step from my point of view, but seems to be also a huge step forward form the JMAP developers point of view (the IETF processes increased the JMAP quality significantly). |
@dumblob @marclaporte I agree and that was an interesting read, thanks for the link. It's a new year and I'm feeling ambitious so I'm going to bump this up and see what I can get done. The other new feature in the works is cardDav, which has read only support now, and I want to expand that to read/write then move on to calDav support. No reason we can't push both that and JMAP forward at the same time :) One prerequisite for this is I want to create a "skeleton" module set for new data sources. Sort of a template of all (or at least most) of the entry points required to create a new data source inside Cypht. Then I can use that as the foundation for supporting JMAP, as well as making it easier to build support for any other protocol we want to implement. |
A slim PHP Library is missing at current time. There is one for Zend: There is many for JS (which is not compatible with current architecture of cypht?!) Protocol Meta for Client: I think it is possible to extract the Implementation out of the Zend Framework from here: But the License is quite limiting: |
For the record, there is also a JMAP<->IMAP proxy which could be useful for testing of some corner cases. |
@ulfgebhardt and @dumblob thanks for the resources! I suspect we will be writing our own JMAP library in PHP for this. Once we have the "skeleton" module set in place for data sources, most of the boilerplate required to set this up in Cypht is in place. Since JMAP is very RESTful, we can leverage our existing API wrapper code that makes doing RESTy things easy. The final bit is the actual work of deciphering the spec and building out the parsing and logical flows which I suspect won't be nearly as hard as IMAP. We also have a nice set of functions in the core module set for common operations so we can just re-use things we use now (like decoding mime encoded header values for example). |
As I dig into this I think I might put JMAP support into the IMAP and SMTP module sets. It will likely be a LOT easier with the only downside being you need those 2 sets enabled to use JMAP. After much head scratching and trial and error, I have a git checkout of Cyrus IMAP running locally with JMAP support - which should be the most up to date WRT JMAP specs as we can get :) |
Update: spent some time on this over the weekend. Some random thoughts:
After getting folder navigation going I tried to add old school mailbox browsing, but can't seem to get quite what I need yet. Surely I'm doing something wrong but I filed an issue anyway because whatever is not working I just don't see it yet: cyrusimap/cyrus-imapd#2627 |
As expected the issue I was having with Cyrus JMAP was not a bug, but a configuration issue on my end. With there help we are back in business :) |
Update: Now able to browse mailboxes and have a basic message view working. Here is the roadmap to MVP:
Once we get that far, I want to circle back around to the library code and see what can be done to improve the performance. Right now we are using JMAP in a very IMAP like way, but we can streamline that in a number of places to take advantage of JAMP features like multiple "commands" in a single API call. |
Update: Ran into another problem with Cyrus JMAP that maybe is not me doing something wrong :) filed an issue (cyrusimap/cyrus-imapd#2631). In the meantime, Cypht JMAP support now works with combined views (unread, flagged, everything). I also reworked the folder logic in the library and was able to remove some module level work-arounds that were icky. Then I started on search integration but was thwarted by the above issue. JMAP is complicated (E-mail is complicated!), but it truly is IMAP simplified and modernized. There is lots more to do but we are making great progress a lot faster than I expected. And I'm sort of obsessed with making it feature complete now that I started working on it :) |
Update: Wrong again. My latest issue was me doing something wrong (specifically not configuring the Cyrus search backend properly). Thanks to the helpful feedback from Cyrus devs it is resolved and search works now with JMAP, as does some message operations (flag/read/unread/etc). For core IMAP stuff needing to be converted, I have move, copy, delete, and folder management up next, following by downloading and then I think we are pretty close to IMAP feature complete! |
Initial feature complete drop in replacement for the Hm_IMAP class issue #180
Compatibility layer for JMAP is feature complete! Needs more testing and love but it's working pretty well so far. Here is the code: https://github.com/jasonmunro/cypht/blob/master/modules/imap/hm-jmap.php Comparing this to the IMAP lib: WOW! Up next is wiring the UI to add/delete JMAP servers from the Settings -> Servers page. |
UI update to add/delete JAMP servers is pushed to the master branch :) Next I'm going to scope out using JMAP for SMTP. This should be way easier as we only communicate with SMTP in 2 places of the code if I recall. |
Is anyone of you in contact with JMAP developers or just people around JMAP? It seems Cypht will be one of the very few first clients supporting JMAP - that could be used to raise awareness of Cypht and its security and mobile advantages. We could start by letting Cypht being linked from JMAP websites. Then maybe write a blog post on JMAP sites, etc. |
@dumblob I have been in contact with the JMAP folks, and we are now listed here: https://jmap.io/software.html. Also I wrote a blog post on JMAP that made it to the front page of hacker news last night and it's driving a TON of traffic :) https://unencumberedbyfacts.com/2019/01/24/jmap-its-like-imap-but-not-really/ |
Bron Gondwana presented JMAP at FOSDEM 2019. Slides with Speakers' Notes: General page: https://fosdem.org/2019/schedule/event/email_standards/ Well done Bron! And well done Jason for such a quick implementation! |
For the benefit of others linked to this issue from the JMAP site, my understanding is that this issue remains open only because the JMAP feature isn't yet in a (non-RC) release? I.e. it is in master, and the (at time of writing) latest 'release', v1.2.0-rc1. I look forward to trying it, thanks! |
@OJFord : yes, that is correct. And as this is a new feature, on a new protocol, expect it to be bumpy, and please file new issues for bugs and missing features. I encourage you to get Cypht master and start testing it out. I feel master is stable enough to be released. In Tiki, we get Cypht master from Packagist and it works quite well: If you have trouble installing Cypht master, you can install a daily build of Tiki |
Fixed the above by adding |
@Yannick243 will resume work here, with some guidance from @josaphatim |
@Shadow243 now joins @Yannick243 |
Spin off: #931 |
@Shadow243 @Yannick243 What is the status here? It's time to release Cypht 2.0 :-) |
Working on this task, we encountered some issues that we had to fix first: #936 We are currently working on the second PR, which will only cover JMAP. |
i'm feeling a bit dumb, but resuming testing on this against stalwart 0.6.0, in the current cypht master i haven't found a way to setup a new jmap account, there's only IMAP and SMTP listed once you've specified your email/passwd. Is there some hidden setting somewhere ? And i dont feel like #939 is fixing it, since it seems to be for an already configured jmap account. the jmap module is correctly listed in CYPHT_MODULES in |
|
ah, thanks. i dont have that checkbox, but now i see where it comes from in the code, so i'll try to figure out which bit is missing. edit bah, nevermind, found it. |
@landryb I am super happy you are helping with JMAP testing. General dev activity level on Cypht has been good recently: https://openhub.net/p/cypht We have many new features and enhancements coming to Cypht 2.0, and JMAP support is the last one I am hoping we can add: #879 All the active devs are new to JMAP so it's much more challenging than other enhancements. Thanks! |
my testing has been limited so far, but im mostly struggling with stalwart, not that much with cypht after all :) Been also testing jmap with meli... |
@landryb Are you saying that JMAP-Cypht is mostly working and we can release Cypht 2.0? |
i've been able to connect to a JMAP testing account without specific subfolders (eg only default folders), and go to folders that contained mails (#939 was needed for that). The number next to the folder name was always zero, regardless of the folders content. i havent tested folders/subfolders nor large volumes of e-mail, nor sending an e-mail. |
Cypht 2.0 will ship with JMAP support, with at least one thing missing (will be done after 2.0): #931 |
Cypht 2.0 has been released! |
As of now, we only have one open issue related to JMAP within Cypht: #931 In theory, everything else works. Since this is so new, I do expect we'll encounter issues and we will work in priority on all issues related to JMAP. So please test! Our reference dev/test server is Stalwart JMAP, and we'd love to collaborate with the Cyrus and Apache James communities, and anyone else working on JMAP! |
Here is a somewhat related thread: |
As of now, there are 3 webmail clients listed here: https://jmap.io/software.html. If others exist, please update https://github.com/jmapio/jmap/blob/master/software/software.mdown Of the 3:
So I conclude Cypht is the first/only Open Source standalone webmail client supporting JMAP. While it’s nice to be the trailblazer, I hope many others will join the club 😊. JMAP is an open standard. We can all work together to make it better. Specifically, I hope Roundcube will join the JMAP club soon (I made the original feature request in 2017): roundcube/roundcubemail#5918 Here are other requests I am tracking:
Beyond JMAP, we are now working on EWS (Exchange Web Services) support: #1278 On a related note, here is a page to mainly compare all active and mature Open Source (thus self-hostable) webmail solutions to manage email from any server with standard email protocols (IMAP, SMTP, JMAP) and EWS (Exchange Web Services): Cypht permits to have all emails in a unified inbox, and even copy or move emails between accounts. |
"JMAP is intended to be a new standard for email clients to connect to mail stores. It therefore intends to primarily replace IMAP + SMTP submission. It is also designed to be more generic such that it can be extended with contacts, calendars in the future (replacing CardDAV/CalDAV). It does not replace MTA-to-MTA SMTP transmission."
http://jmap.io/
The text was updated successfully, but these errors were encountered: