Mailu: Provide auto-configuration files

Created on 25 Jul 2017  ยท  21Comments  ยท  Source: Mailu/Mailu

Modern mail clients attempt auto-configuration to greatly simplify the setup process. Mainly they use XML files requested via http.

Can this be included in mailu? It shouldn't be much effort - an XML template, SSI and the nginx config might be enough.

typfeature

Most helpful comment

Hi There,

The Mailu-Project is currently in a bit of a bind! We are short on man-power, and we need to judge if it is possible for us to put in some work on this issue.

To help with that, we are currently trying to find out which issues are actively keeping users from using Mailu, which issues have someone who want to work on them โ€” and which issues may be less important. These a less important ones could be discarded for the time being, until the project is in a more stable and regular state once again.

In order for us to better assess this, it would be helpful if you could put a reaction on this post (use the :smiley: icon to the top-right).

  • ๐Ÿ‘๏ธ if you need this to be able to use Mailu. Ideally, youโ€™d also be able to test this on your installation, and provide feedback โ€ฆ
  • ๐ŸŽ‰ if you find it a nice bonus, but no deal-breaker
  • ๐Ÿš€ if you want to work on it yourself!
    We want to keep this voting open for 2 weeks from now, so please help out!

All 21 comments

What do you mean SSI? Anyway I think this could indeed be handled in the current version using 302 to the admin interface and generating the cert there. However, how does the MUA query the XML for a given domain if that domain only exposes a MX record?

Thunderbird checks e.g. autoconfig.. If the name cannot be resolved, autoconfig fails. Needs to be checked if a 302 is ok. The process is described in https://www.ullright.org/ullWiki/show/providing-email-client-autoconfiguration-information-from-moens-ch .

SSI is like a simple template language handled by the server. But it's very old.

There is also a project, automx.org, but that's probably overkill.

Well, this sounds a bit more complex than I originally expected. First, we have to handle certificates properly: we can't have domain certificate for every autoconfig.<domain> generated automatically, so we should check if a CNAME on autoconfig will do the trick or if maybe Thunderbird can rely on the MX record or any other SRV record.

Also, implementation for Outlook seems completely different.

Could this be partially implemented if we integrate with z-push for Outlook integration?

I'm currently looking into this, at least Mozilla-compatible auto-config seems very easy because:

  • CNAMEs are fine
  • HTTP-redirects are fine
  • even non-HTTPS is fine (but i hope we all agree that it should not be done this wayโ€ฆ)
  • it's basically just a static XML-file (real-life example in production: https://autoconfig.lynx.uberspace.de/mail/[email protected])

So if I understand it correct, just adding a autoconfig.mymaildomain.com IN CNAME $MainDomainInYouEnvFile and serving a file like in the example above with all <hostname>s pointng to $DOMAIN too and putting the emailaddress-parameter in the <username>s should be enough

So, a simple CNAME for `autoconfig.on the domain (and zone configuration provided on the details page), and a/mail/config*`` endpoint on both the frontend and admin container could actually do the trick. All configurations would be identical I guess, so it's pretty stateless and simple to implement.

If anyone want to give it a go, please PR. Otherwise, I will start working on this after 1.5.1 is properly released :)

Disclaimer: I don't know if all clients that claim/seem to support Mozilla-compatible auto-config actually do implement it the way Mozilla has "standardized" it :grinning:

The specification for the fileformat says that a literal %EMAILADDRESS% is enough for the <username>, so it can really be a static file

I gave it a try with automx. I don't think it is an overkill. It is a pretty small script and covers not only the here discussed autoconfig mechanism following Mozilla, but also support Microsoft's autodiscovery and Apple's mobileconfig. So, instead of reinventing the wheel, we can just take this software, similar to the other pieces that are assembled in Mailu (radicale, clamav, roundcoube, etc...).

While it generally builds, the missing part in my branch is the proper nginx configuration for the front container. I have still some problems with this one. Has anybody an idea?

This would be killer - definitely following this.

I just reviewed your branch and it looks pretty good. The only part that bothers me is automx connecting to the user database. Isn't possible to authenticate first in nginx, and then only forward to automx to generate the configuration files?

We can avoid connecting to the database and just provide the regular connection settings in the config file. This is straight forward and I' m happy to adjust my code and bring it into a PR.

The downside is, that individual users selection whether to use IMAP and/or POP3 will not be taken into consideration and I fear that this can lead to confusion on the side of the user. When e.g. IMAP is not allowed but the auto discovery proposes this as the working configuration.

I just had a look at automx code and here is the dilemma: I was hoping to be able to just use part of it as a lib since it is Python, but the code itself is an absolute nightmare; on the other hand, it just works fine and has enough followers to ensure proper support.

Here is my current take on the matter: tomorrow, I'll merge your work except for the database access and use static configuration for now. Then, we can try and implement a script or custom backend that just queries an API to get the settings from the admin container.

Okay. I just spent an hour trying to simplify things and basically got to the conclusion automx code was too complex for the purpose and there are probably useful libraries we can include directly in the admin container.

Is this really a work in progress, like is there a branch with development code somebody can pickup? Or de we need to start this from the ground up?

I'll remove the status/wip label for now, please re-instate if necessary. (I'm cleaning up the 1.6 milestone)

Hi There,

The Mailu-Project is currently in a bit of a bind! We are short on man-power, and we need to judge if it is possible for us to put in some work on this issue.

To help with that, we are currently trying to find out which issues are actively keeping users from using Mailu, which issues have someone who want to work on them โ€” and which issues may be less important. These a less important ones could be discarded for the time being, until the project is in a more stable and regular state once again.

In order for us to better assess this, it would be helpful if you could put a reaction on this post (use the :smiley: icon to the top-right).

  • ๐Ÿ‘๏ธ if you need this to be able to use Mailu. Ideally, youโ€™d also be able to test this on your installation, and provide feedback โ€ฆ
  • ๐ŸŽ‰ if you find it a nice bonus, but no deal-breaker
  • ๐Ÿš€ if you want to work on it yourself!
    We want to keep this voting open for 2 weeks from now, so please help out!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Hi There,

we see this issue had only little attention ๐Ÿ˜Ÿ. As much as it pains us: In order to get the current issues a bit more manageable for us, we decided to close it. ๐Ÿ‘‹๐Ÿ‘‹

We hope that no one feels offended by doing so. Should the issue get really pressing in the future, please feel free to re-open it.

Thank you for your patience and understanding, ๐Ÿ™‡

  • Your Mailu Team

Thanks a lot @Diman0 for picking up the good work on Mailu! Just wanted to send you a big โค๏ธ and say that it is completely understandable, that you are sorting out issues. I think you are doing a great work with the questionnaires and friendly messages. I also agree on the selection you are doing on the issues I'm following.

Again, thanks a lot and don't let you feel bad for the loud people complaining and not supporting!

Peace

So autoconfig won't be added to mailu? Thunderbird keeps saying "failed to find the settings" and I don't know what to do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

githtz picture githtz  ยท  4Comments

whitef0x0 picture whitef0x0  ยท  4Comments

Angedestenebres picture Angedestenebres  ยท  3Comments

kaiyou picture kaiyou  ยท  4Comments

SJS28092018 picture SJS28092018  ยท  3Comments