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

iOS and autodiscovery #127

Open
kour1er opened this issue Dec 16, 2024 · 5 comments
Open

iOS and autodiscovery #127

kour1er opened this issue Dec 16, 2024 · 5 comments

Comments

@kour1er
Copy link

kour1er commented Dec 16, 2024

When connecting an iOS device to Z-Push, when using the "Sign In" option only the username, not the full email address is transmitted to the Z-Push service even though 'USE_FULLEMAIL_FOR_LOGIN' has been set to true in both /config.php and /autodiscover/config.php.

I sniffed the traffic on an iPad to look at what was actually going on the wire, the verbose logs Z-Push generates and the connection logs via Dovecot. In my setup the login name should be the full email address, i.e. [email protected]. I see this sequence of events:

1 - client device connects to autodiscover.example.com and authenticates. I see the full email address being validated against Dovecot correctly.
2 - Z-Push sends back to the client an XML schema, with both the DisplayName and EMailAddress being correctly set to the full email, i.e. [email protected].
3 - The iOS device correctly receives the schema (validated via sniffing the traffic).
4 - The IOS device then tries to authenticate and then I see in the logs Z-Push failing to login to Dovecot as it only uses the username (i.e. 'test').

I'm not sure if this is an iOS bug or some weird interaction going on here. An obvious workaround would be to set 'auth_default_realm' in Dovecot to the domain ('example.com' in this scenario) but I'd love to know where the issue is occurring. Has anyone else seen this? Am I missing something super obvious? Thanks for any pointers.

Setup info:
clients: iOS 18.2, iPadOS 18.2 both using the official mail app
server: Docker version based on Alpine 3.19.4 with PHP 8.1 and Z-Push 2.7.5. Docker running Docker-Mailserver. Docker running SWAG (i.e. NGINX as reverse proxy).

@matidau
Copy link
Collaborator

matidau commented Dec 18, 2024

I'm experiencing the same on my test iPhone with iOS 18.2. While I know that this wasn't happening on iOS 17, I'm not sure I added on iOS 18.0 or 18.1.

@kour1er
Copy link
Author

kour1er commented Dec 18, 2024

Good to know it's not just me! I wonder what's changed.

@matidau
Copy link
Collaborator

matidau commented Jan 6, 2025

I've updated to iOS 18.2.2 and it is no longer an issue.

@kour1er
Copy link
Author

kour1er commented Jan 7, 2025

Interesting! Just tested here and was still experiencing the issue after upgrading to 18.2.2. One thing I've noticed in testing - if you restart the device, then add the exchange account, it works. Where works is defined as autodiscovery populating the full email address as the username. So maybe iOS is caching something? Not sure how to test for this.

@matidau
Copy link
Collaborator

matidau commented Jan 8, 2025

Yeh not sure either, I am definitely not an iPhone expert. Hopefully they do another update to address this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants