mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-11 21:15:45 +08:00
Do not provide {auth_authen} Milter macro unless the user is authenticated
This commit is contained in:
parent
87f9736605
commit
336c4876e2
1 changed files with 7 additions and 3 deletions
|
@ -232,9 +232,13 @@ impl<T: SessionStream> Session<T> {
|
||||||
.mail_from(
|
.mail_from(
|
||||||
&format!("<{addr}>"),
|
&format!("<{addr}>"),
|
||||||
None::<&[&str]>,
|
None::<&[&str]>,
|
||||||
Macros::new()
|
if !self.data.authenticated_as.is_empty() {
|
||||||
.with_mail_address(addr)
|
Macros::new()
|
||||||
.with_sasl_login_name(&self.data.authenticated_as),
|
.with_mail_address(addr)
|
||||||
|
.with_sasl_login_name(&self.data.authenticated_as)
|
||||||
|
} else {
|
||||||
|
Macros::new().with_mail_address(addr)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
.assert_continue()?;
|
.assert_continue()?;
|
||||||
|
|
Loading…
Add table
Reference in a new issue