Skip to content

api!: remove provider-db handling and provider lookup APIs#8437

Open
hpk42 wants to merge 4 commits into
mainfrom
hpk/remove-provider-db
Open

api!: remove provider-db handling and provider lookup APIs#8437
hpk42 wants to merge 4 commits into
mainfrom
hpk/remove-provider-db

Conversation

@hpk42

@hpk42 hpk42 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

this removes all provider-db related code and data because it's not needed and we do not want to care or maintain for provider-db anyway.

Note that 6dddb97 re-introduces very few exceptions. I verified with adb regarding nauta.cu that it's still needed to provide a working experience for a sizable number of users so i guess it makes sense to retain the exceptions. the other two (hermes and aco-connexion) are less clear but i kept them anyway for now.

provider-db is also preparing for archiving chatmail/provider-db#341

@hpk42
hpk42 force-pushed the hpk/remove-provider-db branch from 713db31 to 8261244 Compare July 20, 2026 17:17
@hpk42
hpk42 marked this pull request as draft July 20, 2026 17:21
@hpk42
hpk42 force-pushed the hpk/remove-provider-db branch from 3854b27 to d8956eb Compare July 21, 2026 10:30
@hpk42
hpk42 force-pushed the hpk/remove-provider-db branch 2 times, most recently from feea15b to f159d46 Compare July 22, 2026 06:18
@hpk42
hpk42 marked this pull request as ready for review July 22, 2026 06:34
Comment thread src/sql/migrations.rs
Comment thread src/provider.rs
worse_media_quality: true,
..Default::default()
},
_ if is_exact_or_subdomain(&domain, "hermes.radio")

@link2xt link2xt Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hermes.radio settings can likely be removed, cc @rafael2k

The problem is that with v2 encryption is always used unless you try really hard to send plaintext emails by typing email addresses and not using the QR codes, so Delta Chat is likely not working as is.

The project is likely using v1 in some form, so if we want to make current v2 versions usable for rhizomatica/hermes, there are other changes needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i am fine to remove hermes.radio special case, and you are probably right, but i didn't want to make the call in the PR so far. If we remove it, then we can also inline apply_legacy*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine removing hermes.radio, we can deal with this in other ways I think.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as with .aco-connexion.org.

@link2xt link2xt Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rafael2k Do you use v2 versions of Delta Chat currently? If it works for you there is no problem keeping the code, but i thought your setup relies on disabling OpenPGP/E2E encryption and removing Autocrypt headers is no longer enough for this with v2.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

By v2 you mean 2.xy.z? Yes.
We do strip all Autocrypt header. If that will not work anymore, I need to change our setup asap.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are no unencrypted Autocrypt headers anymore normally, especially since https://delta.chat/en/2026-03-31-zero
When the users get in contact by scanning a QR code, the QR code already contains symmetric key for encryption, and Autocrypt header is sent in the encrypted part. So users get encrypted chats this way. And generally since v2 (https://delta.chat/en/2025-08-04-encryption-v2) encrypted chats never become unencrypted.

Settings like worse_media_quality: true still make sense to make the client send worse quality images, but you cannot disable E2E encryption by intercepting Autocrypt headers to do your own compression anymore.

Comment thread src/login_param.rs Outdated
Comment thread deltachat-jsonrpc/src/api/types/login_param.rs Outdated
Comment thread src/configure.rs
}
}
/// Applies a few select non-default config values that used to come from provider database.
async fn apply_legacy_domain_config_defaults(context: &Context, addr: &str) -> Result<()> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This whole function can likely be deleted if hermes provider is deleted.

Comment thread src/context.rs Outdated
Comment thread src/provider.rs
Comment thread src/transport.rs Outdated
Comment thread src/transport.rs Outdated
match self.certificate_checks {
ConfiguredCertificateChecks::OldAutomatic => {
provider_strict_tls.unwrap_or(connected_through_proxy)
if disable_strict_tls {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is the same as !disable_strict_tls && connected_through_proxy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, but i am not really a fan of such short-circuiting behaviour. In Python that was considered an issue by a number of devs, until guido introduced the ternary operator operator which would read here like this:

False if disable_strict_tls else connected_through_proxy

So i'd prefer the current more verbose form, but will change it if you insist :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, but i am not really a fan of such short-circuiting behaviour.

connected_through_proxy and disable_strict_tls are simple bool variables, so there is no short-circuiting in this case, can also be connected_through_proxy && !disable_strict_tls and will likely compile to exactly the same code. But not important, can be just marked as resolved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i found a third solution directly in the match arms. reads nicer than either of our approaches imo.

hpk42 added 4 commits July 22, 2026 20:52
BREAKING CHANGE: provider lookup APIs were removed from CFFI and JSON-RPC.

also removes offline provider database code and generated provider data,
provider-specific fields in configure/transport paths, and REPL providerinfo.
Comment thread src/provider.rs
/// Provider.db lookup was removed, but a handful of domains still need these overrides,
/// so they are hard-coded here instead.
pub(crate) fn legacy_settings_for_addr(addr: &str) -> LegacyProviderSettings {
let Ok(email) = EmailAddress::new(addr) else {

@link2xt link2xt Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe the function should be resultified, get_provider_info was returning an error in this case. Then there is also no usage of LegacyProviderSettings::default() (related discussion at https://github.com/chatmail/core/pull/8437/changes#r3631683726).

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