Repository navigation
Conversation
…ection Apple answers password sign-ins with a bare AUTHENTICATIONFAILED.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the actionable defect behind #142: when IMAP sign-in is rejected during account setup (or the settings "test connection" path, which shares it), the app surfaced the raw protocol rejection (
auth failed: imap login: … [AUTHENTICATIONFAILED] …) with nothing actionable. For Apple mailboxes that dead-ends users, because Apple always rejects regular Apple passwords over IMAP — only app-specific passwords work — and the error never says so.check_imap_smtpnow maps an authentication rejection for a recognized Apple mailbox (address@icloud.com/@me.com/@mac.com, or an Apple mail host) to guidance that keeps the server detail and names the fix:Change
crates/flectar-mail-core/src/lib.rs—explain_imap_sign_in+is_apple_mailbox, wired intocheck_imap_smtp(covers both new-account setup and the settings retest). Non-auth errors and non-Apple mailboxes pass through byte-identical.noticloud.comnegative), guidance content (keeps server detail), pass-through of network errors and other providers.User-visible effects
iCloud users who hit a credential rejection now get told exactly what Apple requires instead of a protocol dump. No change for any other provider or error class.
Deep-research notes (why this, and not something else)
\r/\nstripped, spaces preserved) all check out in code — the reporter'sAUTHENTICATIONFAILEDmeans TLS+IMAP succeeded and only the credential was refused, and the issue self-resolved on retry, so there is no confirmed app-side auth defect to fix. The confirmed gap is the unactionable error.gmail_needs_google_sign_in) is followed; core error strings are intentionally untranslated like the rest ofCoreError.Tests
apple_sign_in_guidance_tests; existing core suites cover the touched paths.cargo/rustc), against a byte-verified copy ofmain(base blob hash-matched before patching). Relying on CI (cargo fmt --check,clippy,cargo test) as the gate.Notes
AGPL-3.0-only, with no credentials, mailbox data, or personal fixture data included.