Description
We want to protect the sender date (the Date
header) to reduce the metadata available to the server.
There is some preparation work done in #6669 to make the client read the Date
header from the protected part and using it to set the last_seen
property of the Autocrypt peerstate.
However, initial attempt to replace the Date
header with Thu, 01 Jan 1970 00:00:00 +0000
broke the legacy Python test tests/test_1_online.py::test_resend_message
which tests that resent message gets deleted by the receiver. Currently resent messages are resent with the same Message-ID
(#3238), but a different Date
. We then use this fact to detect resent messages:
Lines 603 to 610 in adcc8a9
We cannot unconditionally delete all messages that have known Message-ID
. We did it in the past and it caused problems for users manually moving the messages between folders: #3138
We also cannot unconditionally move duplicates to the target folder and fetch them, because this previously caused infinite move loops on servers that have multiple aliases for mvbox:
#4544
One way to resolve this would be to move all messages unconditionally, including the duplicates, but only move from INBOX to mvbox and never from other folders. The only case when we might want to move the message out of non-INBOX folder is when it was incorrectly moved into the Spam folder by the spam filter. So maybe move out of INBOX and Spam only, but not out of all folders. This way we don't need to look at the Date, but avoid infinite loops.