mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
smtp: do not use STARTTLS when PLAIN connection is requested
Also do not allow downgrade if STARTTLS is not available
This commit is contained in:
@@ -192,7 +192,8 @@ impl Smtp {
|
||||
};
|
||||
|
||||
let security = match lp.security {
|
||||
Socket::STARTTLS | Socket::Plain => smtp::ClientSecurity::Opportunistic(tls_parameters),
|
||||
Socket::Plain => smtp::ClientSecurity::None,
|
||||
Socket::STARTTLS => smtp::ClientSecurity::Required(tls_parameters),
|
||||
_ => smtp::ClientSecurity::Wrapper(tls_parameters),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user