diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a9b3bd8c..f1ab1ebfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changes - limit the rate of MDN sending #3402 +- ignore ratelimits for bots #3439 - remove `msgs_mdns` references to deleted messages during housekeeping #3387 ### Fixes diff --git a/src/smtp/send.rs b/src/smtp/send.rs index 8967133da..829e114b0 100644 --- a/src/smtp/send.rs +++ b/src/smtp/send.rs @@ -3,6 +3,7 @@ use super::Smtp; use async_smtp::{EmailAddress, Envelope, SendableEmail, Transport}; +use crate::config::Config; use crate::constants::DEFAULT_MAX_SMTP_RCPT_TO; use crate::context::Context; use crate::events::EventType; @@ -32,10 +33,12 @@ impl Smtp { message: &[u8], rowid: i64, ) -> Result<()> { - // Notify ratelimiter about sent message regardless of whether quota is exceeded or not. - // Checking whether sending is allowed for low-priority messages should be done by the - // caller. - context.ratelimit.write().await.send(); + if !context.get_config_bool(Config::Bot).await? { + // Notify ratelimiter about sent message regardless of whether quota is exceeded or not. + // Checking whether sending is allowed for low-priority messages should be done by the + // caller. + context.ratelimit.write().await.send(); + } let message_len_bytes = message.len();