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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2022 15:01:15 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [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.

Not if textsec is optional, it doesn't.

And I think your mental model of how Rmail presents the email in the
reading buffer is not accurate.

> > 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]>").

I think Robert just suggested a way?