Return OK after a successful ManageSieve SASL authentication flow (fixes #187)

This commit is contained in:
mdecimus 2024-06-13 19:30:19 +01:00
parent 835c7d8c30
commit eefdee0361
3 changed files with 4 additions and 2 deletions

View file

@ -88,8 +88,6 @@ async fn train(ctx: PluginContext<'_>, is_train: bool) -> Variable {
return false.into();
}
let c = println!("training: {:?} {}", text, is_spam);
// Train the model
let mut model = BayesModel::default();
model.train(

View file

@ -158,6 +158,9 @@ impl<T: SessionStream> Session<T> {
in_flight,
};
let _ = self
.write(&StatusResponse::ok("Authentication successful").into_bytes())
.await;
self.handle_capability("Authentication successful").await
} else {
match &self.state {

View file

@ -48,6 +48,7 @@ pub async fn test() {
sieve
.send("AUTHENTICATE \"PLAIN\" \"AGpkb2VAZXhhbXBsZS5jb20Ac2VjcmV0\"")
.await;
sieve.assert_read(ResponseType::Ok).await;
sieve
.assert_read(ResponseType::Ok)
.await