Fix session.rcpt.script IfBlock variable name
This commit is contained in:
5
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
5
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -31,11 +31,10 @@ body:
|
|||||||
label: Version
|
label: Version
|
||||||
description: What version of our software are you running?
|
description: What version of our software are you running?
|
||||||
options:
|
options:
|
||||||
|
- v0.8.x
|
||||||
- v0.7.x
|
- v0.7.x
|
||||||
- v0.6.x
|
- v0.6.x
|
||||||
- v0.5.x
|
- v0.5.x or lower
|
||||||
- v0.4.x
|
|
||||||
- v0.3.x or lower
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ impl Default for SessionConfig {
|
|||||||
rewrite: IfBlock::empty("session.mail.rewrite"),
|
rewrite: IfBlock::empty("session.mail.rewrite"),
|
||||||
},
|
},
|
||||||
rcpt: Rcpt {
|
rcpt: Rcpt {
|
||||||
script: IfBlock::empty("session.rcpt."),
|
script: IfBlock::empty("session.rcpt.script"),
|
||||||
relay: IfBlock::new::<()>(
|
relay: IfBlock::new::<()>(
|
||||||
"session.rcpt.relay",
|
"session.rcpt.relay",
|
||||||
[("!is_empty(authenticated_as)", "true")],
|
[("!is_empty(authenticated_as)", "true")],
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ impl<T: SessionStream> Session<T> {
|
|||||||
|
|
||||||
if !is_extended {
|
if !is_extended {
|
||||||
return self
|
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;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -140,10 +140,12 @@ impl<T: SessionStream> Session<T> {
|
|||||||
script: Arc<Sieve>,
|
script: Arc<Sieve>,
|
||||||
params: ScriptParameters<'_>,
|
params: ScriptParameters<'_>,
|
||||||
) -> ScriptResult {
|
) -> ScriptResult {
|
||||||
let core = self.core.clone();
|
self.core
|
||||||
let span = self.span.clone();
|
.run_script(
|
||||||
let params = params.with_envelope(&self.core.core, self).await;
|
script,
|
||||||
|
params.with_envelope(&self.core.core, self).await,
|
||||||
core.run_script(script, params, span).await
|
self.span.clone(),
|
||||||
|
)
|
||||||
|
.await
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user