mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-08 13:04:26 +08:00
Add allow plain text auth on ManageSieve
This commit is contained in:
parent
044ecda98a
commit
414a1434e0
3 changed files with 5 additions and 4 deletions
|
@ -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.")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,4 +14,3 @@ tls.implicit = true
|
|||
[server.listener."sieve"]
|
||||
bind = ["[::]:4190"]
|
||||
protocol = "managesieve"
|
||||
tls.implicit = true
|
||||
|
|
Loading…
Add table
Reference in a new issue