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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Jan 2022 13:51:17 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 19 Jan 2022 10:25:42 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Does textsec-email-suspicious-p expect non-ASCII email addresses to be
> > RFC 2047 encoded?
> 
> Yes.  
> 
> > If so, it will not work in the Rmail display buffers, where email
> > addresses are shown decoded.  For non-ASCII names the function signals
> > an error.
> 
> Rmail does have access to the encoded header, so it'll just have to call
> the textsec function before it decodes it (and displays it).

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.

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?