diff --git a/src/job.rs b/src/job.rs index 87382f286..7ebc135be 100644 --- a/src/job.rs +++ b/src/job.rs @@ -671,7 +671,18 @@ impl Job { // we want to send out an MDN anyway // The job will not be retried so locally // there is no risk of double-sending MDNs. + // + // Read receipts for system messages are never + // sent. These messages have no place to display + // received read receipt anyway. And since their text + // is locally generated, quoting them is dangerous as + // it may contain contact names. E.g., for original + // message "Group left by me", a read receipt will + // quote "Group left by ", and the name can be a + // display name stored in address book rather than + // the name sent in the From field by the user. if msg.param.get_bool(Param::WantsMdn).unwrap_or_default() + && !msg.is_system_message() && context.get_config_bool(Config::MdnsEnabled).await { if let Err(err) = send_mdn(context, &msg).await { diff --git a/src/message.rs b/src/message.rs index 38e90b3dc..c93ab4c9c 100644 --- a/src/message.rs +++ b/src/message.rs @@ -600,6 +600,11 @@ impl Message { || cmd != SystemMessage::Unknown && cmd != SystemMessage::AutocryptSetupMessage } + pub fn is_system_message(&self) -> bool { + let cmd = self.param.get_cmd(); + cmd != SystemMessage::Unknown + } + /// Whether the message is still being created. /// /// Messages with attachments might be created before the diff --git a/src/mimefactory.rs b/src/mimefactory.rs index 5b2cdeb2a..bdfa58174 100644 --- a/src/mimefactory.rs +++ b/src/mimefactory.rs @@ -113,12 +113,7 @@ impl<'a, 'b> MimeFactory<'a, 'b> { ) .await?; - let command = msg.param.get_cmd(); - - if command != SystemMessage::AutocryptSetupMessage - && command != SystemMessage::SecurejoinMessage - && context.get_config_bool(Config::MdnsEnabled).await - { + if !msg.is_system_message() && context.get_config_bool(Config::MdnsEnabled).await { req_mdn = true; } }