None => return,
};
+ let mut dstatus = DStatus::Dsn(dsn);
+
+ // the dsn (enhanced status code can only have a class of 2, 4 or 5
+ // see https://tools.ietf.org/html/rfc3463
+ if qe.borrow_mut().bq_filtered {
+ dstatus = match dsn {
+ 2 => DStatus::BqPass,
+ 4 => DStatus::BqDefer,
+ 5 => DStatus::BqReject,
+ _ => return,
+ }
+
+ }
qe.borrow_mut().add_to_entry(
to,
relay,
- DStatus::Dsn(dsn),
+ dstatus,
parser.current_record_state.timestamp,
);
Block,
Greylist,
Noqueue,
+ BqPass,
+ BqDefer,
+ BqReject,
Dsn(u32),
}
DStatus::Block => 'B',
DStatus::Greylist => 'G',
DStatus::Noqueue => 'N',
+ DStatus::BqPass => 'P',
+ DStatus::BqDefer => 'D',
+ DStatus::BqReject => 'R',
DStatus::Dsn(v) => std::char::from_digit(*v, 10).unwrap(),
};
write!(f, "{}", c)
SIZE: 7298
CLIENT: localhost.localdomain[127.0.0.1],
MSGID: <xyz>
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
SMTP:
L0000001C Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
L0000001D Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
SIZE: 7298
CLIENT: localhost.localdomain[127.0.0.1],
MSGID: <xyz>
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
SMTP:
L0000001C Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
L0000001D Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]
SIZE: 7298
CLIENT: localhost.localdomain[127.0.0.1],
MSGID: <xyz>
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
-TO:5FDCCC85:1C6B541C5D:A: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test4@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test3@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test2@localhost> (192.168.22.40[192.168.22.40]:25)
+TO:5FDCCC85:1C6B541C5D:P: from <test@test.localdomain> to <test1@localhost> (192.168.22.40[192.168.22.40]:25)
SMTP:
L0000001C Dec 18 15:36:32 proxmox-new postfix/smtpd[29902]: connect from test.localdomain[192.168.22.40]
L0000001D Dec 18 15:36:33 proxmox-new postfix/smtpd[29902]: NOQUEUE: client=test.localdomain[192.168.22.40]