mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-10 22:14:42 +08:00
Allow null EHLO when reject-non-fqdn is not set
This commit is contained in:
parent
49bb6ad61d
commit
b2f0525423
1 changed files with 10 additions and 5 deletions
|
@ -299,11 +299,16 @@ impl<T: SessionStream> Session<T> {
|
||||||
Details = syntax
|
Details = syntax
|
||||||
);
|
);
|
||||||
|
|
||||||
self.write(
|
if !self.params.ehlo_reject_non_fqdn && syntax.starts_with("EHLO ")
|
||||||
format!("501 5.5.2 Syntax error, expected: {syntax}\r\n")
|
{
|
||||||
.as_bytes(),
|
self.handle_ehlo("null".to_string(), true).await?
|
||||||
)
|
} else {
|
||||||
.await?;
|
self.write(
|
||||||
|
format!("501 5.5.2 Syntax error, expected: {syntax}\r\n")
|
||||||
|
.as_bytes(),
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Error::InvalidParameter { param } => {
|
Error::InvalidParameter { param } => {
|
||||||
trc::event!(
|
trc::event!(
|
||||||
|
|
Loading…
Add table
Reference in a new issue