From 3b8b520400060eef059c85e3ad7bfefccd17e29f Mon Sep 17 00:00:00 2001 From: Mroik Date: Sat, 11 Apr 2026 23:56:35 +0200 Subject: Fix reply messages The replies do not end with . Fix it. Signed-off-by: Mroik --- src/smtp_server.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/smtp_server.rs b/src/smtp_server.rs index b4f59db..6e48bce 100644 --- a/src/smtp_server.rs +++ b/src/smtp_server.rs @@ -232,12 +232,12 @@ enum Reply { impl std::fmt::Display for Reply { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Reply::Ready(hostname) => write!(f, "220 {}", hostname), - Reply::Completed(hostname) => write!(f, "250 {}", hostname), - Reply::InvalidCommand => write!(f, "500 Invalid command"), - Reply::InvalidParameter => write!(f, "501 Parameter error"), - Reply::BadSequence => write!(f, "503 Bad sequence of commands"), - Reply::StartMailInput => write!(f, "354 ."), + Reply::Ready(hostname) => write!(f, "220 {}\r\n", hostname), + Reply::Completed(hostname) => write!(f, "250 {}\r\n", hostname), + Reply::InvalidCommand => write!(f, "500 Invalid command\r\n"), + Reply::InvalidParameter => write!(f, "501 Parameter error\r\n"), + Reply::BadSequence => write!(f, "503 Bad sequence of commands\r\n"), + Reply::StartMailInput => write!(f, "354 .\r\n"), } } } -- cgit v1.3