Add introducers

- add the `Introducer` types
- get introducers from the certificate store (and log them)
This commit is contained in:
Malte Meiboom
2025-12-15 12:27:20 +01:00
parent dd71b89485
commit e56eb8eb9a
5 changed files with 94 additions and 3 deletions
+11 -2
View File
@@ -93,6 +93,7 @@ impl Daemon {
// setup Context
match HuskContext::new(&config) {
Ok(context) => {
log::debug!("found introducers: {:?}", context.introducers);
cx.data = Some(context).take();
Status::Continue
},
@@ -149,10 +150,18 @@ impl Daemon {
}
}
async fn handle_data(_cx: &mut Context<HuskContext<'_>>) -> Status {
async fn handle_data(cx: &mut Context<HuskContext<'_>>) -> Status {
log::debug!("DATA");
Status::Continue
if let Some(ref mut context) = cx.data {
// XXX: check for early accepting
// if there are no recipients with authenticated certificates
// tell the MTA that this milter is done and the mail can be further
// processed.
Status::Continue
} else {
Status::Tempfail
}
}
async fn handle_header(_cx: &mut Context<HuskContext<'_>>, name: CString, value: CString) -> Status {