mirror of
https://git.proxmox.com/git/pmg-log-tracker
synced 2025-08-12 09:34:18 +00:00
print blocked/quarantined entries if accepted mail exists
In the case of before-queue filtering we have the separation 'QEntry' for accepted mails, as those are the only ones with a queue. And 'SEntry' for blocked and quarantined mails. But if a mail is accepted for one address, but at the same time blocked or quarantined for another address we previously discarded those entries. To fix it we now print it in the 'QEntry' if the attached filter contains blocked and/or quarantined mails. Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
parent
dd76914d00
commit
5ab03bbbee
28
src/main.rs
28
src/main.rs
@ -1481,6 +1481,34 @@ impl QEntry {
|
||||
}
|
||||
}
|
||||
|
||||
if self.bq_filtered {
|
||||
if let Some(fe) = &fe {
|
||||
if fe.borrow().finished && fe.borrow().is_bq {
|
||||
fe.borrow_mut().to_entries.retain(|to| {
|
||||
for to2 in self.to_entries.iter().rev() {
|
||||
if to.to == to2.to {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
true
|
||||
});
|
||||
|
||||
for to in fe.borrow().to_entries.iter().rev() {
|
||||
parser.write_all_ok(format!("TO:{:X}:", to.timestamp as i32,));
|
||||
parser.write_all_ok(&self.qid);
|
||||
parser.write_all_ok(format!(":{}: from <", to.dstatus));
|
||||
parser.write_all_ok(&self.from);
|
||||
parser.write_all_ok(b"> to <");
|
||||
parser.write_all_ok(&to.to);
|
||||
parser.write_all_ok(b"> (");
|
||||
parser.write_all_ok(&to.relay);
|
||||
parser.write_all_ok(b")\n");
|
||||
parser.count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// print logs if '-vv' is specified
|
||||
if parser.options.verbose > 1 {
|
||||
let print_log = |parser: &mut Parser, logs: &Vec<(Box<[u8]>, u64)>| {
|
||||
|
Loading…
Reference in New Issue
Block a user