Closed bobobo1618 closed 1 year ago
I agree that the current behavior is too restrictive, but I think what this PR does is too permissive. It would be nicer to have a proper parser.
Related is #218, although I don't think using regexp is warranted here.
My reading of the spec is that angle brackets are not allowed here, apart from the special case of <>
. I've edited the PR accordingly.
I have a client that sends a message to an SMTP server using this library (the Protonmail bridge) and encounter problems because the client doesn't enclose the
AUTH=
parameter in angle brackets.I looked at the relevant RFC and it doesn't appear that this parameter requires angle brackets. RFC2821 (referenced by the other RFC) section 4.1.2 requires angle brackets for a Path but not for a Mailbox. It explicitly allows Mailboxes without angle brackets:
In other words, the
Local-part
can be composed of aDot-string
, which is composed only alphanumerics plus some special characters (the list of which excludes angle brackets).