fix off-by-one error and fix wrong flag corrections

This commit is contained in:
holger krekel
2019-12-12 02:30:48 +01:00
parent 72e128db2e
commit e9c0492fbd
2 changed files with 4 additions and 4 deletions

View File

@@ -161,7 +161,7 @@ pub fn JobConfigureImap(context: &Context) {
p.send_user = param.addr.clone();
p.send_pw = param.mail_pw.clone();
p.send_port = 465;
p.send_port = 25;
p.smtp_certificate_checks = CertificateChecks::AcceptInvalidCertificates;
p.server_flags = DC_LP_AUTH_NORMAL as i32
| DC_LP_IMAP_SOCKET_PLAIN as i32
@@ -169,7 +169,7 @@ pub fn JobConfigureImap(context: &Context) {
// pretend we did autoconfig, to prevent further tries
param_autoconfig = Some(p);
step_counter = STEP_3_INDEX - 1;
step_counter = 12 - 1;
} else if param.mail_server.is_empty()
&& param.mail_port == 0
/*&&param.mail_user.is_empty() -- the user can enter a loginname which is used by autoconfig then */

View File

@@ -108,11 +108,11 @@ impl LoginParam {
// Rust-TLS does not support nauta.cu's RSA1024 TLS cert.
// see https://github.com/deltachat/deltachat-core-rust/issues/1007
if mail_server.ends_with(".nauta.cu") {
server_flags |= !0x300; // clear out IMAP_SSL/STARTTLS
server_flags &= !0x300; // clear out IMAP_SSL/STARTTLS
server_flags |= 0x400; // set IMAP_PLAIN
}
if send_server.ends_with(".nauta.cu") {
server_flags |= !0x30000; // clear out SMTP_SSL/STARTTLS
server_flags &= !0x30000; // clear out SMTP_SSL/STARTTLS
server_flags |= 0x40000; // set SMTP_PLAIN
}