Skip to content

Commit

Permalink
Dont verify if a user exists in honeypot mode. We literally dont care…
Browse files Browse the repository at this point in the history
… as we want things to go through
  • Loading branch information
MTRNord committed Sep 14, 2022
1 parent 398878d commit 03570db
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/erooster_smtp/src/commands/rcpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ impl Rcpt<'_> {
{
let mut write_lock = self.data.con_state.write().await;
if matches!(&write_lock.state, State::NotAuthenticated) {
for receipt in &receipts {
if !database.user_exists(&receipt.to_lowercase()).await {
lines.send(String::from("550 No such user here")).await?;
return Ok(());
cfg_if::cfg_if! {
if #[cfg(not(feature = "honeypot"))] {
for receipt in &receipts {
if !database.user_exists(&receipt.to_lowercase()).await {
lines.send(String::from("550 No such user here")).await?;
return Ok(());
}
}
}
}
}
Expand Down

0 comments on commit 03570db

Please sign in to comment.