Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: 29e749e26fcffac0c7c0125cb658c516376dcb24
Timestamp: Sun, 01 Sep 2024 21:08:28 +0000 (3 months ago)

+3 -2 +/-1 browse
fix host parsing for lhlo too
1diff --git a/maitred/src/session.rs b/maitred/src/session.rs
2index f5fd268..e9924e2 100644
3--- a/maitred/src/session.rs
4+++ b/maitred/src/session.rs
5 @@ -316,7 +316,7 @@ impl Session {
6 }
7 Request::Lhlo { host } => {
8 self.hostname =
9- Some(Host::parse(host).map_err(|e| smtp_response!(500, 0, 0, 0, e))?);
10+ Some(Host::parse(&parse_host(host)).map_err(|e| smtp_response!(500, 0, 0, 0, e))?);
11 self.reset();
12 self.initialized = Some(Mode::Legacy);
13 Ok(vec![smtp_response!(
14 @@ -329,7 +329,8 @@ impl Session {
15 }
16 Request::Helo { host } => {
17 self.hostname = Some(
18- Host::parse(&parse_host(host)).map_err(|e| smtp_response!(500, 0, 0, 0, e.to_string()))?,
19+ Host::parse(&parse_host(host))
20+ .map_err(|e| smtp_response!(500, 0, 0, 0, e.to_string()))?,
21 );
22 self.reset();
23 self.initialized = Some(Mode::Legacy);