Upstream commit: 9d1c75ab68435e4417337f768291e5f947686203 Enterprise-only files removed or emptied: 63 Enterprise-only snippets removed: 118 in 50 files Dangling module declarations removed: 5 Edits turning enterprise off: 25 Third-party code: 14 files, 0 not in THIRD-PARTY.md Verification: clean One snippet more than v0.16.22, in crates/common/src/auth/authentication.rs (3, was 2).
This commit is contained in:
@@ -12,6 +12,7 @@ use smtp_proto::{
|
||||
use utils::DomainPart;
|
||||
|
||||
use crate::core::{SessionAddress, SessionData};
|
||||
use email::message::delivery::ORCPT_ADDR_TYPE;
|
||||
|
||||
impl SessionData {
|
||||
pub fn apply_envelope_modification(&mut self, envelope: Envelope, value: String) {
|
||||
@@ -111,7 +112,11 @@ impl SessionData {
|
||||
}
|
||||
Envelope::Orcpt => {
|
||||
if let Some(rcpt_to) = self.rcpt_to.last_mut() {
|
||||
rcpt_to.dsn_info = value.into();
|
||||
rcpt_to.dsn_info = value
|
||||
.strip_prefix(ORCPT_ADDR_TYPE)
|
||||
.map(str::to_string)
|
||||
.unwrap_or(value)
|
||||
.into();
|
||||
}
|
||||
}
|
||||
Envelope::Envid => {
|
||||
|
||||
@@ -297,7 +297,7 @@ impl RunScript for Server {
|
||||
None
|
||||
};
|
||||
|
||||
message
|
||||
let _ = message
|
||||
.queue(
|
||||
QueueParams::new(raw_message, session_id, self)
|
||||
.with_dkim_signers(dkim_signers)
|
||||
|
||||
@@ -95,10 +95,8 @@ impl<T: SessionStream> Session<T> {
|
||||
params
|
||||
.envelope
|
||||
.push((Envelope::To, rcpt.address_lcase.to_string().into()));
|
||||
if let Some(orcpt) = &rcpt.dsn_info {
|
||||
params
|
||||
.envelope
|
||||
.push((Envelope::Orcpt, orcpt.as_str().to_lowercase().into()));
|
||||
if let Some(orcpt) = rcpt.orcpt_parameter() {
|
||||
params.envelope.push((Envelope::Orcpt, orcpt.into()));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -109,10 +107,10 @@ impl<T: SessionStream> Session<T> {
|
||||
|
||||
for rcpt in &self.data.rcpt_to {
|
||||
recipients.push(Variable::from(rcpt.address_lcase.to_string()));
|
||||
orcpts.push(match &rcpt.dsn_info {
|
||||
orcpts.push(match rcpt.orcpt_parameter() {
|
||||
Some(orcpt) => {
|
||||
has_orcpts = true;
|
||||
Variable::from(orcpt.as_str().to_lowercase())
|
||||
Variable::from(orcpt)
|
||||
}
|
||||
None => Variable::default(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user