Do not provide {auth_authen} Milter macro unless the user is authenticated
This commit is contained in:
@@ -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()?;
|
||||
|
||||
Reference in New Issue
Block a user