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

Thunderbird style auto configuration #2493

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kimboslice99
Copy link

Saw this on the feature requests some years ago, though I didn't have the skills to accomplish it at the time.

I have tried to handle every scenario, multiple providers, multiple incoming/outgoing servers, etc.

@bjobjobjo
Copy link

How about that Thunderbird auto config CardDav address book?

carddav

Copy link
Collaborator

@bengotow bengotow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I appreciate how defensively you've written the code (checking that keys exist, etc) since I imagine that these will vary / be implemented partially incorrectly by clients.

Is there a domain / set of domains you've been testing this with? I think we can ship it but it'd be nice to run it through a bunch to test it first! Our big lookup table of provider settings also comes from Thunderbird, so I think with this the autoconfig capabilities of Mailspring should largely match! Super cool.

let smtpDetails = null;

// Handle IMAP
if (Array.isArray(provider.incomingServer)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a case where provider could exist but provider.incomingServer (or outgoingServer) is missing? It might be nice to do an early return false in that case too.

@kimboslice99
Copy link
Author

I have only been testing with my own handful of domains, I am not sure of any publicly available providers that use thunderbird autoconfig.

Indentation was all messed up (VS Code was being a nuisance) and I did add another check for the incoming/outgoing server

@kimboslice99
Copy link
Author

kimboslice99 commented Feb 25, 2025

Seems I was missing the dependency from app/package.json which was causing releases to silently fail.

However, after adding this package I then receive

Error: Sorry, Mailspring does not support window.eval() for security reasons.", source: Mailspring\app\dist\Mailspring-win32-x64\resources\app.asar\internal_packages\onboarding\lib\onboarding-helpers.js (413)

I am not really sure why this occurs. I am not using window.eval()? Seems really strange...
Guess fast-xml-parser uses eval, huh, not really sure how to handle this.

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

Successfully merging this pull request may close these issues.

3 participants