Skip to content

Conversation

@link2xt
Copy link
Collaborator

@link2xt link2xt commented Oct 27, 2025

This allows dcaccount: to contain domain name instead of the URL.

This is similar to old dcaccount: with URL,
but creates a 9-character username on the client
and avoids making an HTTPS request.

The scheme is reused to avoid the apps
needing to register for the new scheme.

http support is removed because it was
not working already, there is a check
that the scheme is https when the URL
is actually used and the core has
no way to make HTTP requests without TLS.

For this to be used clients should switch from old dcaccount scheme to dcaccount9. We don't convert dcaccount to dcaccount9 automatically even for known chatmail servers.
Corresponding desktop PR: deltachat/deltachat-desktop#5618
Android issue: deltachat/deltachat-android#3963
iOS issue: deltachat/deltachat-ios#2855

@link2xt link2xt force-pushed the link2xt/dcaccount9 branch 4 times, most recently from 056dfcc to 624e0a4 Compare October 27, 2025 20:16
@link2xt link2xt marked this pull request as ready for review October 27, 2025 20:56
Copy link
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

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

lgtm -- did you test in practise that it works with nine?

let me note that i am slightly skeptical of introducing a new scheme: we could also just special-case dcaccount:https://nine.testrun.org/newemail and not introduce a new account scheme that we might have to support forever.

link2xt added a commit to deltachat/deltachat-desktop that referenced this pull request Oct 28, 2025
Corresponding core PR: <chatmail/core#7360>
dcaccount9 is similar to dcaccount, but contains the domain
instead of the URL and generates 9 character username
with a long password locally.
This way we avoid unnecessary HTTPS request.
@link2xt
Copy link
Collaborator Author

link2xt commented Oct 28, 2025

I tested it with nine with desktop PR: deltachat/deltachat-desktop#5618
And I tested it with dcaccount9:mehl.cloud QR code on desktop.

let me note that i am slightly skeptical of introducing a new scheme: we could also just special-case dcaccount:https://nine.testrun.org/newemail and not introduce a new account scheme that we might have to support forever.

Then nine becomes special and for everyone else onboarding is slower and less reliable. The goal is to remove username length configuration for chatmail relay and use dcaccount9 on the page after upgrade. "9" in the scheme means nine characters, not nine.testrun.org. Same for multi-transport, configuring transports at least for the default list should not involve HTTPS requests.

@link2xt link2xt marked this pull request as draft October 28, 2025 01:53
@link2xt
Copy link
Collaborator Author

link2xt commented Oct 28, 2025

Will change it to just using dcaccount: and recognize that it is a new scheme by domain so apps don't have to register for new scheme.

This is similar to old `dcaccount:` with URL,
but creates a 9-character username on the client
and avoids making an HTTPS request.

The scheme is reused to avoid the apps
needing to register for the new scheme.

`http` support is removed because it was
not working already, there is a check
that the scheme is `https` when the URL
is actually used and the core has
no way to make HTTP requests without TLS.
@link2xt link2xt force-pushed the link2xt/dcaccount9 branch from 729869a to 0bc3db4 Compare October 28, 2025 02:29
link2xt added a commit to deltachat/deltachat-desktop that referenced this pull request Oct 28, 2025
Depends on the core PR: <chatmail/core#7360>
Using domain name in dcaccount scheme works
similarly to existing scheme,
but no HTTPS request is made
and credentials are generated locally on the client.
@link2xt link2xt marked this pull request as ready for review October 28, 2025 02:39
}

/// scheme: `DCACCOUNT:https://example.org/new_email?t=1w_7wDjgjelxeX884x96v3`
/// scheme: `DCACCOUNT:example.org`
Copy link
Contributor

Choose a reason for hiding this comment

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

Would make sense to document this variant in the interface repo https://github.com/deltachat/interface/blob/main/uri-schemes.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@link2xt link2xt merged commit 05ba206 into main Oct 28, 2025
29 checks passed
@link2xt link2xt deleted the link2xt/dcaccount9 branch October 28, 2025 12:10
link2xt added a commit to deltachat/interface that referenced this pull request Oct 28, 2025
link2xt added a commit to deltachat/interface that referenced this pull request Oct 29, 2025
link2xt added a commit to deltachat/interface that referenced this pull request Oct 29, 2025
nicodh pushed a commit to deltachat/deltachat-desktop that referenced this pull request Nov 3, 2025
Depends on the core PR: <chatmail/core#7360>
Using domain name in dcaccount scheme works
similarly to existing scheme,
but no HTTPS request is made
and credentials are generated locally on the client.
Simon-Laux pushed a commit to deltachat/interface that referenced this pull request Jan 16, 2026
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.

4 participants