nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
851 stars 262 forks source link

Nextcloud Mail unable to auto configure emails #10211

Open jSydorowicz21 opened 1 month ago

jSydorowicz21 commented 1 month ago

Steps to reproduce

  1. Attempt to auto configure an email provided by spacemail.com

Expected behavior

Email should auto configure properly as done with all other email clients.

Actual behavior

Email fails to auto configure. Log found here:

{"reqId":"TNfgwADZFUbKcUfPBcVO","level":3,"time":"2024-10-01T23:35:24+00:00","remoteAddr":"redacted","user":"redacted","app":"PHP","method":"GET","url":"/apps/mail/api/autoconfig/test?host=mx2.spacemail.com&port=465","message":"fsockopen(): Unable to connect to mx2.spacemail.com:465 (Connection refused) at /var/www/html/custom_apps/mail/lib/Service/AutoConfig/ConnectivityTester.php#32","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0","version":"30.0.0.14","data":{"app":"PHP"}}
{"reqId":"OtQvno8W3kLBeosPb1Oi","level":3,"time":"2024-10-01T23:35:29+00:00","remoteAddr":"redacted","user":"redacted","app":"PHP","method":"GET","url":"/apps/mail/api/autoconfig/test?host=mx2.spacemail.com&port=587","message":"fsockopen(): Unable to connect to mx2.spacemail.com:587 (Connection timed out) at /var/www/html/custom_apps/mail/lib/Service/AutoConfig/ConnectivityTester.php#32","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0","version":"30.0.0.14","data":{"app":"PHP"}}
{"reqId":"ScEmOhEhJWxWvFATayck","level":3,"time":"2024-10-01T23:35:29+00:00","remoteAddr":"redacted","user":"redacted","app":"PHP","method":"GET","url":"/apps/mail/api/autoconfig/test?host=mx2.spacemail.com&port=993","message":"fsockopen(): Unable to connect to mx2.spacemail.com:993 (Connection timed out) at /var/www/html/custom_apps/mail/lib/Service/AutoConfig/ConnectivityTester.php#32","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0","version":"30.0.0.14","data":{"app":"PHP"}}
{"reqId":"6IH8AuJPzeCFz3NWa79T","level":3,"time":"2024-10-01T23:35:29+00:00","remoteAddr":"redacted","user":"redacted","app":"PHP","method":"GET","url":"/apps/mail/api/autoconfig/test?host=mx2.spacemail.com&port=143","message":"fsockopen(): Unable to connect to mx2.spacemail.com:143 (Connection timed out) at /var/www/html/custom_apps/mail/lib/Service/AutoConfig/ConnectivityTester.php#32","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0","version":"30.0.0.14","data":{"app":"PHP"}}

Mail app version

4.0.1

Mailserver or service

spacemail.com

Operating system

Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database

MariaDB

Additional info

All other email clients seem to resolve fine and I've verified with a few tools that the mx is configured correctly. When manually configured it can correctly access mail boxes.

ChristophWurst commented 1 month ago

What are the expected configuration parameters? You could look them up in the provider docs or try another email client like Thunderbird.

jSydorowicz21 commented 1 month ago

What are the expected configuration parameters? You could look them up in the provider docs or try another email client like Thunderbird.

I've screenshotted the expected auto configured parameters below, so far all the other email clients we've used resolve these correctly: image

ChristophWurst commented 1 month ago

Thanks! We should be able to debug this

kesselb commented 1 month ago

Hey there! Could you please share the domain with us? If you'd prefer not to post it here, feel free to email me at danielk@nextcloud.com.

kesselb commented 1 month ago

Based on the information at https://www.spaceship.com/roadmap/?feature=email-auto-discovery-auto-configuration-for-spacemail, it seems that auto discovery isn't available, so it's likely that our guessing didn't find the right mx.

jSydorowicz21 commented 1 month ago

Hey there! Could you please share the domain with us? If you'd prefer not to post it here, feel free to email me at danielk@nextcloud.com.

Heyo, I sent you an email with the end domain, I can also provide a burner email account for the domain if that would help in resolving the issue!

kesselb commented 1 month ago

Thank you,

I'm unsure if we can do something here. The auto discovery looks at the ispdb and the mx records.

IspDb:

https://github.com/nextcloud/mail/blob/912779f0c3640f822332be2dd829103dc3dc57f3/lib/Service/AutoConfig/IspDb.php#L35-L39

=> Your domain does not provide an xml document with the conncecitiy parameters and is also not enlisted in mozilla's list.

MX:

=> The mx records for your domain resolve to mx1.spacemail.com and mx2.spacemail.com.

Thunderbird was also not able to find the right configuration for your domain. Which email client was able to look up the settings automatically?

nextcloud-command commented 1 day ago

Hi there! It looks like this issue hasn’t seen much activity for a while and might need a bit more information to move forward. If we don’t hear back soon, we may close it to keep things organized. Thanks again for your contributions – we really appreciate it!