-
-
Notifications
You must be signed in to change notification settings - Fork 102
[After UIs introduced a multi-tranpsort screen] api!: Remove unused config smtp_certificate_checks, deprecate old transport configs #6803
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
Draft
Hocuri
wants to merge
4
commits into
main
Choose a base branch
from
hoc/deprecate-old-configs-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,50 +43,84 @@ use crate::tools::get_abs_path; | |
)] | ||
#[strum(serialize_all = "snake_case")] | ||
pub enum Config { | ||
/// Deprecated(2025-04). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably needs to be updated before merging |
||
/// Use ConfiguredAddr, EnteredLoginParam, or add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Email address, used in the `From:` field. | ||
Addr, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// IMAP server hostname. | ||
MailServer, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// IMAP server username. | ||
MailUser, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// IMAP server password. | ||
MailPw, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// IMAP server port. | ||
MailPort, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// IMAP server security (e.g. TLS, STARTTLS). | ||
MailSecurity, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// How to check TLS certificates. | ||
/// | ||
/// "IMAP" in the name is for compatibility, | ||
/// this actually applies to both IMAP and SMTP connections. | ||
ImapCertificateChecks, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// SMTP server hostname. | ||
SendServer, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// SMTP server username. | ||
SendUser, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// SMTP server password. | ||
SendPw, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// SMTP server port. | ||
SendPort, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// SMTP server security (e.g. TLS, STARTTLS). | ||
SendSecurity, | ||
|
||
/// Deprecated option for backwards compatibility. | ||
/// Deprecated(2025-04). | ||
/// Use EnteredLoginParam, and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Certificate checks for SMTP are actually controlled by `imap_certificate_checks` config. | ||
SmtpCertificateChecks, | ||
|
||
/// Whether to use OAuth 2. | ||
/// | ||
/// Historically contained other bitflags, which are now deprecated. | ||
|
@@ -215,32 +249,47 @@ pub enum Config { | |
/// The primary email address. Also see `SecondaryAddrs`. | ||
ConfiguredAddr, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// List of configured IMAP servers as a JSON array. | ||
ConfiguredImapServers, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured IMAP server hostname. | ||
/// | ||
/// This is replaced by `configured_imap_servers` for new configurations. | ||
ConfiguredMailServer, | ||
|
||
/// Configured IMAP server port. | ||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// This is replaced by `configured_imap_servers` for new configurations. | ||
/// Configured IMAP server port. | ||
ConfiguredMailPort, | ||
|
||
/// Configured IMAP server security (e.g. TLS, STARTTLS). | ||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// This is replaced by `configured_imap_servers` for new configurations. | ||
/// Configured IMAP server security (e.g. TLS, STARTTLS). | ||
ConfiguredMailSecurity, | ||
|
||
/// Configured IMAP server username. | ||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// This is set if user has configured username manually. | ||
/// Configured IMAP server username. | ||
ConfiguredMailUser, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured IMAP server password. | ||
ConfiguredMailPw, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured TLS certificate checks. | ||
/// This option is saved on successful configuration | ||
/// and should not be modified manually. | ||
|
@@ -249,29 +298,47 @@ pub enum Config { | |
/// but has "IMAP" in the name for backwards compatibility. | ||
ConfiguredImapCertificateChecks, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// List of configured SMTP servers as a JSON array. | ||
ConfiguredSmtpServers, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured SMTP server hostname. | ||
/// | ||
/// This is replaced by `configured_smtp_servers` for new configurations. | ||
ConfiguredSendServer, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured SMTP server port. | ||
/// | ||
/// This is replaced by `configured_smtp_servers` for new configurations. | ||
ConfiguredSendPort, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured SMTP server security (e.g. TLS, STARTTLS). | ||
/// | ||
/// This is replaced by `configured_smtp_servers` for new configurations. | ||
ConfiguredSendSecurity, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured SMTP server username. | ||
/// | ||
/// This is set if user has configured username manually. | ||
ConfiguredSendUser, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Configured SMTP server password. | ||
ConfiguredSendPw, | ||
|
||
|
@@ -280,6 +347,9 @@ pub enum Config { | |
/// ConfiguredImapCertificateChecks is actually used. | ||
ConfiguredSmtpCertificateChecks, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use ConfiguredLoginParam and add_transport{from_qr}()/list_transports() instead. | ||
/// | ||
/// Whether OAuth 2 is used with configured provider. | ||
ConfiguredServerFlags, | ||
|
||
|
@@ -301,6 +371,9 @@ pub enum Config { | |
/// ID of the configured provider from the provider database. | ||
ConfiguredProvider, | ||
|
||
/// Deprecated(2025-04). | ||
/// Use [`Context::is_configured()`] instead. | ||
/// | ||
/// True if account is configured. | ||
Configured, | ||
|
||
|
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In deltachat.h there is mail_pw etc still around.
mail_pw
is even marked as "always needed".Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mail_pw
etc. is still used in order for the UIs to query the entered login params. The UIs will switch tolist_transports()
when they implement a screen for listing and editing the transports. The reasoning for this is that UIs would have to do work twice, if they have to switch to `list_transports() now, and then later completely rework the account-login options, anyway.We could change this, but I don't see what it has to do with the PR here? Though we will likely mark
mail_pw
etc. as deprecated or remove it in a few months from now, anyways, so, I don't think it's important right now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, wait, it's long since I opened the PR here, and when opening the PR here, I didn't know that we still want to use
mail_pw
etc. in the UI. I will mark the PR here as a draft, and revive it when we actually don't need these anymore.