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 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!(