Skip to content

Commit 9f9beb2

Browse files
committed
feat: Do not copy Chat-Version header into outer part
Chat-Version is used sometimes by Sieve filters to move messages to DeltaChat folder: https://github.com/mailcow/mailcow-dockerized/blob/37beed6ad93f259b97cad41877982bce95295629/data/conf/dovecot/global_sieve_before This probably prevents notifications to MUAs that don't watch DeltaChat but watch INBOX. There are however disadvantages to exposing Chat-Version: 1. Spam filters may not like this header and it is difficult or impossible to tell if `Chat-Version` plays role in rejecting the message or delivering it into Spam folder. If there is no such header visible to the spam filter, this possibility can be ruled out. 2. Replies to chat messages may have no `Chat-Version` but have to be moved anyway. 3. The user may have no control over the Sieve filter, but it comes preconfigured in mailcow, so it is not possible to disable it on the client. Thanks to link2xt for providing this motivation.
1 parent 2519d18 commit 9f9beb2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/mimefactory.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -947,8 +947,7 @@ impl MimeFactory {
947947
//
948948
// These are standard headers such as Date, In-Reply-To, References, which cannot be placed
949949
// anywhere else according to the standard. Placing headers here also allows them to be fetched
950-
// individually over IMAP without downloading the message body. This is why Chat-Version is
951-
// placed here.
950+
// individually over IMAP without downloading the message body.
952951
let mut unprotected_headers: Vec<(&'static str, HeaderType<'static>)> = Vec::new();
953952

954953
// Headers that MUST NOT (only) go into IMF header section:
@@ -1063,11 +1062,7 @@ impl MimeFactory {
10631062
mail_builder::headers::raw::Raw::new("[...]").into(),
10641063
));
10651064
}
1066-
"in-reply-to"
1067-
| "references"
1068-
| "auto-submitted"
1069-
| "chat-version"
1070-
| "autocrypt-setup-message" => {
1065+
"in-reply-to" | "references" | "auto-submitted" | "autocrypt-setup-message" => {
10711066
unprotected_headers.push(header.clone());
10721067
}
10731068
_ => {

0 commit comments

Comments
 (0)