Allow null EHLO when reject-non-fqdn is not set

This commit is contained in:
mdecimus 2025-07-03 21:21:55 -04:00
parent 49bb6ad61d
commit b2f0525423

View file

@ -299,11 +299,16 @@ impl<T: SessionStream> Session<T> {
Details = syntax
);
self.write(
format!("501 5.5.2 Syntax error, expected: {syntax}\r\n")
.as_bytes(),
)
.await?;
if !self.params.ehlo_reject_non_fqdn && syntax.starts_with("EHLO ")
{
self.handle_ehlo("null".to_string(), true).await?
} else {
self.write(
format!("501 5.5.2 Syntax error, expected: {syntax}\r\n")
.as_bytes(),
)
.await?;
}
}
Error::InvalidParameter { param } => {
trc::event!(