mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2024-10-23 15:00:14 +00:00
Return OK after a successful ManageSieve SASL authentication flow (fixes #187)
This commit is contained in:
parent
835c7d8c30
commit
eefdee0361
3 changed files with 4 additions and 2 deletions
|
@ -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(
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue