On 2023-11-02, Simon Connah <simon.n.con...@protonmail.com> wrote: > Valid as in conforms to the standard. Although having looked at the > standard that might be more difficult than originally planned.
Yes. Almost nobody actually implements "the standard" as in RFC 2822 section 3.4.1 (which can contain, for example, non-printable control characters, and comments), nor is it particularly clear that they should. So while checking against "the spec" might sound right, it's highly unlikely that it's what you actually want. Would you really want to allow: (jam today) "chris @ \"home\""@ (Chris's host.)public.example for example? And would you be able to do anything with it if you did? -- https://mail.python.org/mailman/listinfo/python-list