bkaankose / Wino-Mail

Built-in Mail & Calendars app clone for Windows.
https://www.winomail.app/
GNU General Public License v3.0
710 stars 34 forks source link

[Proposal] More robust IMAP autodiscovery #156

Open chenseanxy opened 6 months ago

chenseanxy commented 6 months ago

Describe the solution you'd like

Currently Wino gets IMAP settings from the emailsettings.firetrust.com API, but the contents of these datasets are not configurable by email admins. There are some ways site admins can configure autodiscovery for their sites: (in brackets: standards established by)

At this point it's difficult to know of which clients currently supports which standards, and there are probably more private databases that some clients use to do autodiscovery (like Microsoft's AutoDetect service).

I'm not sure which ones to implement, but I think it'd be crucial that at least one of these admin-configurable autodiscover sources get implemented (and admins can make sure they configure that one specifically for Wino).

Is your proposal implemented in Windows Mail?

It's difficult to know definitively, what Windows Mail uses.

However from my experience, Wino sometimes fails autodetect when Windows Mail doesn't. At least for the case of our org that has SRV _autodiscover configured, Windows Mail was able to autodiscover settings based on that (or it's somehow Microsoft's AutoDetect service), but not Wino.

Additional context

Protocols:

Helpful writeups:

bkaankose commented 6 months ago

Nicely done investigation.

AutoDiscoveryService definitely lacks lots of capabilities right now. I wanted to include Thunderbird Autoconfig at some point but never had the time for it.

This would speed up things for a lot of new users since most of them don't want to search for the IMAP settings they've been offered from their provider.

chenseanxy commented 6 months ago

I think what we can do, currently, is the plain XML versions of Thunderbird and MSExchange, maybe later on we can add SRV support of both of these.

Implementing both of these should be simple enough:

Now we're introducing multiple sources, there's the consideration about priority:

So to implement this, here's what I'm thinking:

If it's OK you can assign this and I'll start working on it this week. (Sorry for writing too much, I'm usually overcautious in new codebases)

bkaankose commented 6 months ago

I think you sum up pretty well. As long as we return AutoDiscoverySettings you don't need a lot of changes in the current code.

If you have something better in mind, you may completely discard the existing code and rewrite the module for auto discovery as well. I don't mind it since current implementation lacks a lot of things.

Assigned to @chenseanxy