mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-10-10 20:45:48 +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(
|
||||
&format!("<{addr}>"),
|
||||
None::<&[&str]>,
|
||||
Macros::new()
|
||||
.with_mail_address(addr)
|
||||
.with_sasl_login_name(&self.data.authenticated_as),
|
||||
if !self.data.authenticated_as.is_empty() {
|
||||
Macros::new()
|
||||
.with_mail_address(addr)
|
||||
.with_sasl_login_name(&self.data.authenticated_as)
|
||||
} else {
|
||||
Macros::new().with_mail_address(addr)
|
||||
},
|
||||
)
|
||||
.await?
|
||||
.assert_continue()?;
|
||||
|
|
Loading…
Add table
Reference in a new issue