[mu4e bug] mu4e-compose-resend ("c") re-encodes/escapes already encoded headers in resent message
When you have a name like mine you'll get a From header like =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason <[email protected]>, I had some local sending issues so (due to exim issues I won't go into) ended up grabbing a few mails from my Maildir for re-sending.
In the compose view I'll see my sent-mail as-is, but the compose view then doesn't distinguisg betweet already-encoded headers, and ends up double-encoding them. So I ended up with =?us-ascii?Q?=3D=3Futf-8=3FB=3Fw4Z2YXIgQXJuZmrDtnLDsA=3D=3D=3F=3D?= Bjarmason <[email protected]>.
This doesn't only apply to From, but e.g. also CC. See this E-Mail I sent to the Git ML for an example. FWIW manually replacing the already-encoded headers with non-encoded in the compose view works as a workaround. It's how I sent this.
I tested this on the latest master today, b8db8fed (Merge pull request #1992 from nicolasavru/patch-1, 2021-04-26). I was originally using Debian's 1.4.5, which had the same issue.
This bug has probably been there ever since b72db626 (mu4e: implement resending, 2016-02-16), I haven't checked but most likely it also impacts e.g. mu4e~draft-open-file and not just mu4e-compose-resend. Presumably it's some interaction between mu4e and mml, but I got lost in trying to track it down myself.