Subject: bug#51733: 27.1; Detect impossible email addresses better

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 19 Jan 2022 13:54:37 +0100

Eli Zaretskii <[email-masked]> writes:

> This is unfortunate.  It means, for example, that a simple lazy
> discovery of suspicious addresses by scanning the email reading buffer
> with regular expressions will not work, and the feature must instead
> scan the original mbox buffer.

There's no scanning -- rmail displays the From header, right?  So it
does decoding before displaying the header.  It has to do the textsec
stuff first, too.

> Why cannot we lift this restriction?  mail-header-parse-address is not
> the only way to parse email addresses.  Or maybe we could encode the
> email address if the original one causes an error?

There is no reliable way to parse a decoded mail address, and since this
is a security thing, we don't want to do DWIM and guesses (which is what
you have to do when composing a valid email address from a string like
"Fóo, Jr. <[email-masked]>").

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no