mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-09-06 20:14:43 +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
|
||||
);
|
||||
|
||||
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!(
|
||||
|
|
Loading…
Add table
Reference in a new issue