Skip to content
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

Feature Request: Support Mozilla autoconfig #865

Closed
phoerious opened this issue Oct 24, 2015 · 18 comments
Closed

Feature Request: Support Mozilla autoconfig #865

phoerious opened this issue Oct 24, 2015 · 18 comments
Assignees
Labels
type: enhancement New features or improvements to existing features.
Milestone

Comments

@phoerious
Copy link

When using K9 mail with IMAP/SMTP servers other than well known mail service providers like GMail, automatic configuration of new mail accounts will almost certainly fail.

It would be great if K9 mail would support autoconfig like proposed by Mozilla: https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration

Basically, this works as follows: I enter fred@example.com as email address. Instead of guessing that my mail server is imap.example.com, my connection security SSL/TLS at port 993 and my username fred, K9 contacts http://autoconfig.example.com/mail/config-v1.1.xml?emailaddress=fred@example.com which returns an XML configuration file. This XML file tells K9, that the mail server is actually someotherhost.example.net, STARTTLS at port 143 is the preferred connection method and my user name is fred@example.com.

Microsoft uses similar techniques for their Exchange servers, but instead of querying autoconfig.example.com, the domain autodiscover.example.com is used. See https://msdn.microsoft.com/en-us/library/office/jj900169(v=exchg.150).aspx for more information.

@cketti cketti added the type: enhancement New features or improvements to existing features. label Nov 2, 2015
@cketti cketti added this to the Onboarding milestone Nov 2, 2015
@philipwhiuk
Copy link
Contributor

philipwhiuk commented Apr 19, 2016

Also note SRV records for configuring incoming mail servers

DNS-based configuration: created by IETF in 2011. SRV records give

all information for email configuration. Information about this way
can be found here: https://tools.ietf.org/html/rfc6186

and we could use MX records to determine SMTP server addresses.

This method doesn't completely autoconfigure it - you'd still have to know the login format - email address / user-part / something else.

NB: This is: https://code.google.com/archive/p/k9mail/issues/2331

@JacZig
Copy link
Contributor

JacZig commented Sep 15, 2016

It's a pity that the code from https://github.com/dzan/k-9/tree/experimental/settings-autocomplete-finalfixes was never merged.

Did it need extra work?

@stoecker
Copy link

Any progress with this? It works like a charm for Thunderbird and others and setting up a script which auto-creates the files on server side took me less than a day with parsing the postfix and dovecot configurations for proper values for all hosted domains and usernames. A static file is much less work again.

I'd like to see my favourite Android mail programm also support that easy mechanism. Many domain providers support this already out of the box.

Its as easy as download the file (replace example.com and fred with mail address):
http://autoconfig.example.com/mail/config-v1.1.xml?emailaddress=fred@example.com
or as second try
http://example.com/.well-known/autoconfig/mail/config-v1.1.xml
and parse the resulting XML:

The XML format is really easy:
https://developer.mozilla.org/en-US/docs/Mozilla/Thunderbird/Autoconfiguration/FileFormat/HowTo

@stoecker
Copy link

P.S. The Microsoft methods are complicated, partly undocumented and not even supported by all Microsoft tools (I tested several when I tried to implement usable server support and in the end gave up), so the Thunderbird method is the only useful way ATM.

@code-chicken
Copy link

Actually there are at least three ways for autoconfiguration:

  • Autodiscover, xml based: created by Microsoft about 12 years ago. Probably mostly for Outlook/Exchange accounts, but also works with any other email account. This site should give all information needed for implementation:
  • Autoconfig, xml based: created by the Mozilla foundation. Quite simple xml configuration information originally created for Thunderbird, in the meantime also being used by other clients.
  • DNS-based configuration: created by IETF in 2011. SRV records give all information for email configuration.

With any of these configuration mechanisms a user would only have to provide his email address and a password to get the correct configuration settings for pop3, imap and smtp (submission).

@stoecker
Copy link

As said in last comment the Microsoft stuff is very complicated, incompletely documented, differs between client versions and is not even fully supported by Microsoft tools, so I'd drop that in any consideration.

The SRV based stuff is fine, but limited in scope to Autoconfig. It can't provide username and some other details (login methods, preferred ports, ...).

Thought a fine implementation should probably try Autoconfig first and when not provided use SRV based configuration for the server names.

@cweiske
Copy link

cweiske commented Oct 9, 2017

This issue was worked on at GSOC 2017, see:

Unfortunately it has not been merged yet :-/

@HumanG33k

This comment has been minimized.

@thunderbird thunderbird deleted a comment from jvaubourg Mar 12, 2018
@rugk

This comment has been minimized.

@smeinecke

This comment has been minimized.

@wiktor-k
Copy link
Contributor

wiktor-k commented Nov 6, 2018

@smeinecke Last time I checked the branch that had this feature it had a lot of other changes so it was really hard to cherry-pick and the quality was not that great (but it worked! :) ).

I suppose it would take some time to get it in shape and at least support a minimal subset of autoconfig.xml.

@computersalat

This comment has been minimized.

wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Jan 16, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Jan 17, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Feb 10, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Feb 21, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Mar 1, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
wiktor-k added a commit to wiktor-k/k-9 that referenced this issue Mar 1, 2019
This change makes account setup query mail provider's HTTPS server and
fills in appropriate settings for store and transport settings.

If there is no such file or the file is malformed the account setup
proceeds as usual with the manual setup.

If the user doesn't want to automatically discover server settings they
can initiate manual setup by pressing "Manual Setup" button on the first
screen.

Currently implemented autodiscovery scheme is Thunderbird Autoconfig but
this can be extended to additional methods (e.g. DNS or autodiscover).

Resolves thunderbird#865.

See: https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
@hex-m
Copy link

hex-m commented Oct 8, 2019

Parts of the solution have been merged in march. If you care for one provider explicitly you can also add the config to providers.xml until this is resolved.

@rugk
Copy link

rugk commented Oct 9, 2019

Hmm, my provider is altready in the XML, but in the last setup I did some time ago, I still had to configure it manually. Was a version with that already released?

@ASLLR
Copy link

ASLLR commented Jun 15, 2022

Hi evreyone, I think that with the rapprochement between thunderbird and K9 this issue is again relevant?

Thank you in advance,

@fleaz
Copy link

fleaz commented Jun 15, 2022

The roadmap for the near future includes improved account setup using Thunderbird account auto-configuration

It was even part of the official announcement :)

@williamdes
Copy link

As a follow up to #6250 I would like to add to this thread that I have created a project tat allows you to run a server that supports all currently known autodiscover methods and the code has comments about what real apps use what method.
Feel free to leave feedback on https://github.com/wdes/mail-autodiscover-autoconfig
I hope it's not too much off topic
Anyway, it can help anyone that would want to test autodiscover code/feature

@cketti
Copy link
Member

cketti commented Nov 7, 2023

Thunderbird's Autoconfig mechanism has now been available in K-9 Mail 6.7xx beta versions for a while.

@cketti cketti closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New features or improvements to existing features.
Projects
Development

Successfully merging a pull request may close this issue.