Add allow plain text auth on ManageSieve

This commit is contained in:
mdecimus 2024-02-25 19:27:29 +01:00
parent 044ecda98a
commit 414a1434e0
3 changed files with 5 additions and 4 deletions

View file

@ -114,7 +114,7 @@ impl<T: SessionStream> Session<T> {
Command::Capability | Command::Logout | Command::Noop => Ok(command),
Command::Authenticate => {
if let State::NotAuthenticated { .. } = &self.state {
if self.stream.is_tls() {
if self.stream.is_tls() || self.imap.allow_plain_auth {
Ok(command)
} else {
Err(StatusResponse::no("Cannot authenticate over plain-text.")

View file

@ -34,10 +34,12 @@ impl<T: SessionStream> Session<T> {
response.extend_from_slice(b"\"\r\n");
response.extend_from_slice(b"\"VERSION\" \"1.0\"\r\n");
if !self.stream.is_tls() {
response.extend_from_slice(b"\"SASL\" \"\"\r\n");
response.extend_from_slice(b"\"STARTTLS\"\r\n");
} else {
}
if self.stream.is_tls() || self.imap.allow_plain_auth {
response.extend_from_slice(b"\"SASL\" \"PLAIN OAUTHBEARER\"\r\n");
} else {
response.extend_from_slice(b"\"SASL\" \"\"\r\n");
};
if let Some(sieve) = self
.jmap

View file

@ -14,4 +14,3 @@ tls.implicit = true
[server.listener."sieve"]
bind = ["[::]:4190"]
protocol = "managesieve"
tls.implicit = true