Skip to content

Commit

Permalink
Fix EHLO response
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyfallWasTaken committed Aug 26, 2024
1 parent 3c2e751 commit f1835d8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions crates/vortex-smtp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,16 @@ async fn process<T: Fn(&str) -> bool>(
tracing::trace!("EHLO");
state.greeting_done = true;
state.esmtp = true;
socket.write_all(messages::HELO_RESPONSE).await?;

let mut response = Vec::new();
response.extend_from_slice(messages::HELO_RESPONSE);

for ext in esmtp::SUPPORTED_EXTENSIONS {
socket.write_all(format!("250-{ext}\n").as_bytes()).await?;
response.extend_from_slice(format!("250-{ext}\n").as_bytes());
}
socket.write_all(b"250 SMTPUTF8").await?;
response.extend_from_slice(b"250 SMTPUTF8");

socket.write_all(&response).await?;
}

Command::MailFrom { email } => {
Expand Down

0 comments on commit f1835d8

Please sign in to comment.