YunoHost / issues

General issue tracker for the YunoHost project
71 stars 8 forks source link

Mail clients automatic configuration still painful #1556

Open eauchat opened 4 years ago

eauchat commented 4 years ago

I'm opening this issue, because right now, I've just been having a one hour chat with someone who wants to use a mail client (apple's iphone mail app) to access their account on my yunohost server. They didn't manage to make the configuration, and I'm a bit clueless on how to help them from far away. Iphone's apple mail client is not the best software that's sure, but I think that we agree that this shouldn't happen in the first place. Everything should be configured automatically, thanks to the autoconfiguration mechanism.

Quite a few times, I've had some problems, and I thought I had solved them. But I still don't have it 100% clear all the things that should be done as an admin, things I could check to understand why the discovery mechanism is failing with my server.

Please correct me if I'm wrong, but I didn't find a page in the documentation specifying all the things that should be in place, so I "admin" can check that my server is well configured. There is documentation on how to configure a client manually, but what would be cool would be admin documentation about autoconfiguration.

I'm happy to make such a page (if you also think it's useful), but at the moment, I don't know what should be in it, because I'm still not so clear about the mechanism.

Some general documentations specify some DNS entries that should be set like this recent issue. In this question, I also found references to clients looking at autoconfig.example.com but I don't remember anything like this in yunohost. There is the well-known mechanism implemented by this PR...

So I think this page could contain:

If some people think this page is useful and want to contribute feeding this thread with what they know, to help me making a good documentation, that'd be wonderful :)

alexAubin commented 4 years ago

Somewhat related, maybe could explain why it doesn't work in some cases : https://cybre.space/@aleks/103958482609680623

But not 100% sure ...

Uh moi aussi j'ai eu des soucis de "ça marche pas tout le temps" ... J'ai l'impression que :

  • il faut qu'on soit plus contraignant dans notre "location truc" dans la conf nginx (utiliser les ^ ~ comme pour le acme challenge). Sinon ca marchpo si y'a une app à la racine
  • mettre le snippet aussi pour https car c'est ce qui est vérifié en premier
myrrhashad commented 4 years ago

Just did the test again, and :

1- I can confirm that Thunderbird did not get the autoconfig file (the settings it provided were not the same as the ones provided in the file). I think this could be linked to the DNS records in your provider's, though ? For example, with my provider, autoconfig.tld is a default record sending back to OVH.

Screenshot_2020-04-11 Votre espace client Web OVHcloud

So maybe this can be solved by adding those DNS fields to the ones already here in the "recommended DNS configuration" page.

2- The autoconfig file on Yunohost will be correctly filled only if you use the same domain name for your mails and your server. For example, I have a primary domain for my server, and a secondary domain that's used only for my mails. But to configure Thunderbird, I have to state the primary domain name as the IMAP server. Could be that my config misses something, tho. But in that case, it calls for more documentation.

alexAubin commented 4 years ago

I think this could be linked to the DNS records in your provider's, though ? For example, with my provider, autoconfig.tld is a default record sending back to OVH. [...] So maybe this can be solved by adding those DNS fields to the ones already here in the "recommended DNS configuration" page.

Hmf ... didn't know about that -.- ... Can you confirm that in the past you did not subscribe to any mail-related offer on OVH (e.g. OVH mailbox service or idk what it's called) ?

We can indeed add some DNS recommendation about these, but it's just a pain in the ass to have to configure all those ... (Plus Bram was mentionning about _imap. and _submission. or something like that ...)

The autoconfig file on Yunohost will be correctly filled only if you use the same domain name for your mails and your server. For example, I have a primary domain for my server, and a secondary domain that's used only for my mails. But to configure Thunderbird, I have to state the primary domain name as the IMAP server. Could be that my config misses something, tho. But in that case, it calls for more documentation.

Eh, do you know what's the error exactly ? Is it only about the correct info being filled in thunderbird's conf, or does it lead to a certificate issue ? (It's a known issue that configuring mail client with another domain than the main domain leads to certificate issue ... unfortunately that's not easily fixable, there's simply no way to tell postfix to send a different certificate depending on the domain, you would need multiple IPv4 + multiple postfix processes)

alexAubin commented 4 years ago

Btw yesterday I made this small commit which should help a bit (especially if you have apps installed on the root) ... but I guess as Shad's comment suggests, that's not gonna cover everything and we have to add DNS records :'<

myrrhashad commented 4 years ago

Can you confirm that in the past you did not subscribe to any mail-related offer on OVH (e.g. OVH mailbox service or idk what it's called) ?

I checked, there is a "one free email !" service packaged with the domain name. But I didn't specifically requested it, since I wanted to manage that on Yunohost. Yes, it's a pain :D

(It's a known issue that configuring mail client with another domain than the main domain leads to certificate issue ... unfortunately that's not easily fixable, there's simply no way to tell postfix to send a different certificate depending on the domain, you would need multiple IPv4 + multiple postfix processes)

Oh, i didn't know about that, though i did encounter the issue after. Mine is before, when checking the settings.

If I use the secondary domain, dedicated to the mails, as the server name, Thunderbird can't check the settings : thunderbird chapo

So I have to use the primary domain name as the server name : thunderbird yuno

But the autoconfig file generated by Yunohost provides the secondary domain, cha***.fr, as the server, so it would be useless as-is.

merchmanager commented 3 years ago

Facing same challenge. Few hosting sites like lightsail etc block port 25 unless opened up or the account is a month old. so used sendgrid and roundcube to set up mail. But the mail is not accessible from iphone. Have tried setting up with SMTP relay settings as well as yunohost login settings but it just fails. Somewhere in between the TLS/SSL setting also is playing a part but not clear if that is the reason. We need a guide as iphone now is over 7% of phone sales and managing from desktop is not convenient. For now have set up a forward from roundcube/yunohost to personal email, but that has its own challenges.