Fix session.rcpt.script IfBlock variable name

This commit is contained in:
mdecimus
2024-05-31 14:38:03 +02:00
parent 4e7087d335
commit 649ccfdba0
4 changed files with 11 additions and 10 deletions

View File

@@ -31,11 +31,10 @@ body:
label: Version
description: What version of our software are you running?
options:
- v0.8.x
- v0.7.x
- v0.6.x
- v0.5.x
- v0.4.x
- v0.3.x or lower
- v0.5.x or lower
validations:
required: true
- type: dropdown

View File

@@ -609,7 +609,7 @@ impl Default for SessionConfig {
rewrite: IfBlock::empty("session.mail.rewrite"),
},
rcpt: Rcpt {
script: IfBlock::empty("session.rcpt."),
script: IfBlock::empty("session.rcpt.script"),
relay: IfBlock::new::<()>(
"session.rcpt.relay",
[("!is_empty(authenticated_as)", "true")],

View File

@@ -116,7 +116,7 @@ impl<T: SessionStream> Session<T> {
if !is_extended {
return self
.write(format!("250 {} says hello\r\n", self.hostname).as_bytes())
.write(format!("250 {} you had me at HELO\r\n", self.hostname).as_bytes())
.await;
}

View File

@@ -140,10 +140,12 @@ impl<T: SessionStream> Session<T> {
script: Arc<Sieve>,
params: ScriptParameters<'_>,
) -> ScriptResult {
let core = self.core.clone();
let span = self.span.clone();
let params = params.with_envelope(&self.core.core, self).await;
core.run_script(script, params, span).await
self.core
.run_script(
script,
params.with_envelope(&self.core.core, self).await,
self.span.clone(),
)
.await
}
}