dateemailimapmalformed

How to change headers of an E-Mail inplace (via IMAP)


I have some E-Mails without a Date header in an Inbox. That's why they appear incorrectly in my MUA (Mozilla Thunderbird). So I would like to fix this.

There is an extension, with which I could manually edit the headers of a message. However, what it really does, is creating a new message and deleting the old one.

Is there a method to modify a message via IMAP or in another way generally?

How could I use that method, without manually talking to the server.


Solution

  • No. IMAP messages are immutable, by definition. If they were not, nothing would know whether they needed to resync them or not.

    From RFC 3501, 2.3.1.1, statement 4:

             4) The combination of mailbox name, UIDVALIDITY, and UID
            must refer to a single immutable message on that server
            forever.  In particular, the internal date, [RFC-2822]
            size, envelope, body structure, and message texts
            (RFC822, RFC822.HEADER, RFC822.TEXT, and all BODY[...]
            fetch data items) must never change.  This does not
            include message numbers, nor does it include attributes
            that can be set by a STORE command (e.g., FLAGS).