mirror of
https://github.com/chatmail/relay.git
synced 2026-08-11 11:00:52 +00:00
fix(smtp): Properly handle bounce messages (#63)
Closes #58 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
38627bfb4b
commit
8a1684d488
@@ -116,6 +116,11 @@ where
|
||||
.write_all(b"250-filtermail\r\n250-XFORWARD ADDR\r\n250 OK\r\n")
|
||||
.await?;
|
||||
writer.flush().await?;
|
||||
} else if cmd.to_uppercase().starts_with("MAIL FROM:<>") {
|
||||
// bounce message
|
||||
envelope.mail_from = String::new();
|
||||
writer.write_all(b"250 OK\r\n").await?;
|
||||
writer.flush().await?;
|
||||
} else if cmd.to_uppercase().starts_with("MAIL FROM:") {
|
||||
if let Some(from) = extract_address(cmd) {
|
||||
match handler.handle_mail(&from) {
|
||||
|
||||
Reference in New Issue
Block a user