Skip to content

feat: ignore Chat-Disposition-Notification-To value - #8681

Open
link2xt wants to merge 1 commit into
mainfrom
link2xt/ignore-chat-disposition-notification-to-value
Open

feat: ignore Chat-Disposition-Notification-To value#8681
link2xt wants to merge 1 commit into
mainfrom
link2xt/ignore-chat-disposition-notification-to-value

Conversation

@link2xt

@link2xt link2xt commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Main change is the removal of the comparison of Chat-Disposition-Notification-To to the From header for incoming messages.

Removed code that was settting WantsMdn for outgoing messages is a leftover not cleaned up in ade39fe We do not actually use WantsMdn for outgoing messages.

@link2xt
link2xt force-pushed the link2xt/ignore-chat-disposition-notification-to-value branch from 9c5ae2c to 44270d7 Compare September 10, 2026 22:51
@link2xt link2xt changed the title fix: ignore the value of Chat-Disposition-Notification-To value fix: ignore Chat-Disposition-Notification-To value Sep 10, 2026
@link2xt
link2xt force-pushed the link2xt/ignore-chat-disposition-notification-to-value branch from 44270d7 to 0d885c4 Compare September 10, 2026 22:57
@link2xt
link2xt marked this pull request as ready for review September 10, 2026 23:23

/// Test that From with multiple addresses is not allowed.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_parse_first_addr() {

@link2xt link2xt Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is from 09c7ab1 and was testing something different back then and checking that the first address is used. I kept the test just to avoid deleting tests, but it is now testing the opposite of what it was testing originally when the test was introduced.

@link2xt link2xt changed the title fix: ignore Chat-Disposition-Notification-To value feat: ignore Chat-Disposition-Notification-To value Sep 11, 2026
@link2xt
link2xt force-pushed the link2xt/ignore-chat-disposition-notification-to-value branch from 0d885c4 to b2d482d Compare September 11, 2026 03:18
Comment thread src/mimeparser.rs Outdated

if has_header_protection {
*chat_disposition_notification_to = None;
*wants_mdn = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong substitute, needs to be false.

Apparently we lack a test that an incoming encrypted non-mdn requesting message avoids sending a read receipt. Maybe test_outgoing_wants_mdn can just grow this case at the end, and be renamed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added two tests, i think we did not have any Rust tests that disabled MDNs.

Main change is the removal of the comparison of Chat-Disposition-Notification-To
to the From header for incoming messages.

Removed code that was settting WantsMdn for outgoing messages
is a leftover not cleaned up in ade39fe
We do not actually use WantsMdn for outgoing messages.
@link2xt
link2xt force-pushed the link2xt/ignore-chat-disposition-notification-to-value branch from b2d482d to 2969a81 Compare September 11, 2026 07:42
Comment thread src/mimeparser.rs
// just have send a message in the subject with an empty body.
// Besides, we want to show something in case our incoming-processing
// failed to properly handle an incoming message.
if self.parts.is_empty() && self.mdn_reports.is_empty() {

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole branch is for really weird messages, probably the only way to construct them is to create multipart/mixed without any parts, immediately starting with a trailer. I tweaked the code inside to match WantsMdn documentation, but such messages likely should just be assigned to trash with the simplest possible tombstone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants