CalDAV Scheduling - part 6

This commit is contained in:
mdecimus
2025-06-21 19:53:23 +02:00
parent 068457ea87
commit 367ddeeae4
24 changed files with 869 additions and 73 deletions

View File

@@ -27,7 +27,7 @@ use mail_builder::{
use mail_parser::decoders::html::html_to_text;
use smtp::core::{Session, SessionData};
use smtp_proto::{MailFrom, RcptTo};
use std::{str::FromStr, sync::Arc};
use std::{str::FromStr, sync::Arc, time::Duration};
use store::write::{BatchBuilder, now};
use trc::{AddContext, TaskQueueEvent};
use utils::{sanitize_email, template::Variables};
@@ -423,6 +423,7 @@ async fn send_alarm(
}
// RCPT TO
session.params.rcpt_errors_wait = Duration::from_secs(0);
let _ = session
.handle_rcpt_to(RcptTo {
address: rcpt_to,

View File

@@ -18,7 +18,7 @@ use mail_builder::{
};
use smtp::core::{Session, SessionData};
use smtp_proto::{MailFrom, RcptTo};
use std::sync::Arc;
use std::{sync::Arc, time::Duration};
use store::{
ValueKey,
write::{AlignedBytes, Archive, TaskQueueClass, ValueClass, now},
@@ -219,6 +219,7 @@ async fn send_imip(
}
// RCPT TO
session.params.rcpt_errors_wait = Duration::from_secs(0);
let _ = session
.handle_rcpt_to(RcptTo {
address: to.clone(),

View File

@@ -331,10 +331,7 @@ impl TaskQueueManager for Server {
impl Task {
fn remove_lock(&self) -> bool {
// Bayes locks are not removed to avoid constant retraining
matches!(
self.action,
TaskAction::Index { .. } | TaskAction::SendAlarm { .. }
)
!matches!(self.action, TaskAction::BayesTrain { .. })
}
fn lock_key(&self) -> Vec<u8> {