Skip to content

Separate IMAP and SMTP configuration #1835

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

Merged
merged 1 commit into from
Aug 22, 2020
Merged

Separate IMAP and SMTP configuration #1835

merged 1 commit into from
Aug 22, 2020

Conversation

Hocuri
Copy link
Collaborator

@Hocuri Hocuri commented Aug 14, 2020

From #1832 (for 2 it was necessary to also do 5, and I am not done with 2 yet, either)


(by @link2xt)
Fixes #646
Also fixes point (4), previously AcceptInvalidCertificates instead of Automatic settings were applied for autoconfigured (with either XML or provider DB) servers, so strict_tls was not used.

@Hocuri Hocuri changed the title Implement points 2, and partly 5 [WIP] Implement points 2, and partly 5 Aug 14, 2020
@Hocuri
Copy link
Collaborator Author

Hocuri commented Aug 14, 2020

Ping @link2xt maybe you can have a look at it, whether this was the way you intended it. You can also push at this pr, I will be careful with force pushing.

@Hocuri
Copy link
Collaborator Author

Hocuri commented Aug 14, 2020

The ci is failing, looks like this bug: rust-lang/rust#64496

@Hocuri Hocuri changed the title [WIP] Implement points 2, and partly 5 [WIP] Implement points 2, and partly 5 of @link2xt's dc_config.txt Aug 14, 2020
@link2xt link2xt changed the title [WIP] Implement points 2, and partly 5 of @link2xt's dc_config.txt WIP: Improve automatic configuration Aug 14, 2020
@link2xt link2xt changed the title WIP: Improve automatic configuration WIP: Separate IMAP and SMTP configuration Aug 15, 2020
}
param.send_port = match param.send_security {
Socket::Automatic => 0,
Socket::STARTTLS | Socket::Plain => 587,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have changed heuristic to use port 587 instead of port 25 for plain.

Port 25 is for MTA-MTA transmission, it shoud not be used by Delta Chat at all.

@r10s
Copy link
Contributor

r10s commented Aug 15, 2020

The ci is failing, looks like this bug: rust-lang/rust#64496

ci in #1831 is failing because of the same bug - in fact, i came to this issue when searching for the error string in duckduckgo :)

@link2xt link2xt force-pushed the nicer-configure branch 3 times, most recently from 25db574 to 15eca6e Compare August 15, 2020 20:59
@link2xt link2xt changed the title WIP: Separate IMAP and SMTP configuration Separate IMAP and SMTP configuration Aug 15, 2020
pub type SmtpServers = Vec<ServerParams>;

#[derive(Debug)]
pub struct LoginParamNew {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This name is unclear. Could it be named AutoconfigParam or something like this?

As I understand it, loginparam_old_to_new converts user-provided settings into the input for automatic configuration algorithm, and loginparam_new_to_old is a very simple autoconfiguration algorithm that converts results obtained from autoconfig XML or provider database into LoginParam with the first IMAP and SMTP server.

"Old" LoginParam is not going anywhere until automatic reconfiguration is implemented, and it is not a short-term goal. It is what is saved in the database under configured_ settings.

Also this LoginParamNew, besides renaming, could be moved into configure module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, I had not really thought about naming before and such things before.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As for loginparam_old_to_new and the other way round, the thought was that I could implement point 5 only partly first and then already test it using these conversion methods. And that they might come handy later under a different name.

So, feel free to rename and change these things, I never planned to merge these functions as they currently are.

@link2xt link2xt force-pushed the nicer-configure branch 3 times, most recently from 6032a5c to 88a4a0a Compare August 16, 2020 01:13
@r10s r10s mentioned this pull request Aug 16, 2020
Copy link
Contributor

@r10s r10s left a comment

Choose a reason for hiding this comment

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

read through most lines of the pr and also tested it with some accounts, already lgtm :)
i just have some comments to deltachat.h, however, i already created a pr to target that, #1839 can be merged to this pr.

Copy link
Collaborator Author

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

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

Looks good except for the db conversion that confused me a little.

I can't approve because this technically is my own pr.

@r10s
Copy link
Contributor

r10s commented Aug 17, 2020

maybe we should do a bugfix-release core45 before merging that finally in, also as this requires some additional work in the uis.

@r10s r10s mentioned this pull request Aug 18, 2020
@link2xt link2xt force-pushed the nicer-configure branch 3 times, most recently from a60b2f8 to 5dcbb88 Compare August 22, 2020 15:35
Co-Authored-By: link2xt <[email protected]>
Co-Authored-By: bjoern <[email protected]>
@link2xt link2xt merged commit 0fc57bd into master Aug 22, 2020
@link2xt link2xt deleted the nicer-configure branch August 22, 2020 18:29
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.

Deprecate server_flags in favor of mail_security and send_security
3 participants