From e149acaa5192c5675f2217e949917bfb859e6c57 Mon Sep 17 00:00:00 2001 From: mdecimus Date: Sun, 23 Jun 2024 09:23:08 +0200 Subject: [PATCH] Do not return CAPABILITIES after ManageSieve AUTH=PLAIN SASL exchange (closes #548) --- README.md | 3 ++- crates/managesieve/src/op/authenticate.rs | 5 +---- tests/src/imap/managesieve.rs | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 19950c746..565185bab 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Key features: - **SMTP** server: - Built-in [DMARC](https://datatracker.ietf.org/doc/html/rfc7489), [DKIM](https://datatracker.ietf.org/doc/html/rfc6376), [SPF](https://datatracker.ietf.org/doc/html/rfc7208) and [ARC](https://datatracker.ietf.org/doc/html/rfc8617) support for message authentication. - Strong transport security through [DANE](https://datatracker.ietf.org/doc/html/rfc6698), [MTA-STS](https://datatracker.ietf.org/doc/html/rfc8461) and [SMTP TLS](https://datatracker.ietf.org/doc/html/rfc8460) reporting. - - Inbound throttling and filtering with granular configuration rules, sieve scripting and milter integration. + - Inbound throttling and filtering with granular configuration rules, sieve scripting, MTA hooks and milter integration. - Distributed virtual queues with delayed delivery, priority delivery, quotas, routing rules and throttling support. - Envelope rewriting and message modification. - **Spam Phishing** filter: @@ -81,6 +81,7 @@ Key features: - Email aliases, mailing lists, subaddressing and catch-all addresses support. - Automatic account configuration and discovery with [autoconfig](https://www.ietf.org/id/draft-bucksch-autoconfig-02.html) and [autodiscover](https://learn.microsoft.com/en-us/exchange/architecture/client-access/autodiscover?view=exchserver-2019). - Integration with **OpenTelemetry** to enable monitoring, tracing, and performance analysis. + - Webhooks for event-driven automation. - Disk quotas. - **Web-based administration**: - Account, domain, group and mailing list management. diff --git a/crates/managesieve/src/op/authenticate.rs b/crates/managesieve/src/op/authenticate.rs index 672b8fa99..d069c5437 100644 --- a/crates/managesieve/src/op/authenticate.rs +++ b/crates/managesieve/src/op/authenticate.rs @@ -164,10 +164,7 @@ impl Session { in_flight, }; - let _ = self - .write(&StatusResponse::ok("Authentication successful").into_bytes()) - .await; - self.handle_capability("Authentication successful").await + Ok(StatusResponse::ok("Authentication successful").into_bytes()) } else { match &self.state { State::NotAuthenticated { auth_failures } diff --git a/tests/src/imap/managesieve.rs b/tests/src/imap/managesieve.rs index b2f57975b..ed3fcf48b 100644 --- a/tests/src/imap/managesieve.rs +++ b/tests/src/imap/managesieve.rs @@ -49,10 +49,10 @@ pub async fn test() { .send("AUTHENTICATE \"PLAIN\" \"AGpkb2VAZXhhbXBsZS5jb20Ac2VjcmV0\"") .await; sieve.assert_read(ResponseType::Ok).await; - sieve - .assert_read(ResponseType::Ok) - .await - .assert_contains("MAXREDIRECTS"); + /*sieve + .assert_read(ResponseType::Ok) + .await + .assert_contains("MAXREDIRECTS");*/ // CheckScript sieve.send("CHECKSCRIPT \"if true { keep; }\"").await;