Fix spam filter: Use original instead of rewritten RCPT on checks
This commit is contained in:
@@ -294,12 +294,6 @@ impl SessionData {
|
||||
}
|
||||
}
|
||||
|
||||
/*impl Default for SessionData {
|
||||
fn default() -> Self {
|
||||
Self::local(AccessToken::from_id(0), None, vec![], vec![], 0)
|
||||
}
|
||||
}*/
|
||||
|
||||
impl SessionAddress {
|
||||
pub fn new(address: String) -> Self {
|
||||
let address_lcase = address.to_lowercase();
|
||||
|
||||
@@ -79,12 +79,23 @@ impl<T: SessionStream> Session<T> {
|
||||
.as_ref()
|
||||
.map(|m| m.flags)
|
||||
.unwrap_or_default(),
|
||||
env_rcpt_to: self
|
||||
env_rcpt_rewritten_to: self
|
||||
.data
|
||||
.rcpt_to
|
||||
.iter()
|
||||
.map(|r| r.address_lcase.as_str())
|
||||
.collect(),
|
||||
env_rcpt_orig_to: self
|
||||
.data
|
||||
.rcpt_to
|
||||
.iter()
|
||||
.map(|r| {
|
||||
r.dsn_info
|
||||
.as_deref()
|
||||
.and_then(|info| info.strip_prefix("rfc822;"))
|
||||
.unwrap_or(r.address_lcase.as_str())
|
||||
})
|
||||
.collect(),
|
||||
is_test: false,
|
||||
is_train: false,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user