Skip to content

dissolve "primary" relay notion (configured_addr) #8572

Closed
2 of 2 issues completed
Closed

Description

@hpk42

configured_addr is device-local since #8510 but it's still used in four areas:

  • which transports sends Smtp::connect_configured reads configured_addr to determine where to connect to for sending messages out. This is maybe the only remaining valid use, and configured_addr could evolve to just mean "last successful SMTP send" while there are no other consumers/setters than the sending logic. Failover for SMTP #8607

  • background fetch was introduced before multi-relay support. It uses configured_addr to connect to a particular IMAP relay but it's probably historic. We should be able to connect to all IMAP relays in parallel, as the Context::fetch_msgs_mutex will serialize all fetches. So the fastest relay wins. Imap::new_configured function can be deleted, removing the use of configured_addr with it. I only see upsides. feat: perform background fetch from all transports #8592

  • used as a pseudo-identity string in OpenPGP User IDs (will be fixed with Autocrypt2), securejoin parameters, location KML (fixed in refactor: Don't store email address in location KML. #8615), backup and key export filenames (fixed in refactor: Don't include email addresses in export filenames #8626). They all should go, one way or another, because email addresses are not a good ID after core-V2. Maybe we can just replace it with fingerprint, which is the actual identity. If you juggle multiple profile backups or keys, then fingerprint is the proper distinguisher for identity.

  • encryption info: Config::ConfiguredAddr is used but shouldn't. If the encryption dialog is to show two peers always in the same orde (which is actually broken today, because configured_addr is not neccessarily synced). Fixed in feat: Use display name for contacts in encryption info #8609

  • Final-Recipient in MDNs (to be removed in Remove Original-Recipient and Final-Recipient fields from MDNs #8645)

  • Chat-Disposition-Notification-To contains unused address, MDN is sent to the contact rather than this address. EDIT: the value was compared to the From header, this check is removed in feat: ignore Chat-Disposition-Notification-To value #8681

  • Sender header contains unused address, it is only used to indicate that display name in the From header should not be saved as a contact display name, e.g. for bridge bots.

  • unencrypted_email stock string talks about email provider and shows the domain name from ConfiguredAddr:

    core/src/chat.rs

    Lines 2941 to 2949 in 49c30ec

    let addr = context.get_config(Config::ConfiguredAddr).await?;
    let text = stock_str::unencrypted_email(
    context,
    addr.unwrap_or_default()
    .split('@')
    .nth(1)
    .unwrap_or_default(),
    )
    .await;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions