fix: send MDNs to self even if MDNs are disabled

MDNs to self are used for seen status synhronization between devices.
This commit is contained in:
link2xt
2026-08-13 09:14:48 +00:00
committed by l
parent 1a959c392b
commit ec4d195814
3 changed files with 34 additions and 6 deletions

View File

@@ -177,6 +177,9 @@ pub enum Config {
/// True if Message Delivery Notifications (read receipts) should
/// be sent and requested.
///
/// MDNs to self used for seen status synchronization between devices
/// are sent in any case when multi-device mode (bcc_self) is enabled.
#[strum(props(default = "1"))]
MdnsEnabled,

View File

@@ -649,12 +649,6 @@ async fn send_mdn_rfc724_mid(
/// Tries to send a single MDN. Returns true if more MDNs should be sent.
async fn send_mdn(context: &Context, smtp: &mut Smtp) -> Result<bool> {
if !context.should_send_mdns().await? {
context.sql.execute("DELETE FROM smtp_mdns", []).await?;
return Ok(false);
}
info!(context, "Sending MDNs.");
context
.sql
.execute("DELETE FROM smtp_mdns WHERE retries > 6", [])