Can we delimit group address in a list with only a semi colon? #2

Open
opened 2023-07-23 16:57:29 +00:00 by quentin · 0 comments
Owner

Currently eml-codec only support , to delimit multiple addresses (wether they are single or group addresses):

To: "Colleagues": "James Smythe" <james@vandelay.com>;, Friends:
    jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;

But mail-parser seems to support delimitation with ;, as this is what is provided in their README:

To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends:
    jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;

This clearly breaks the grammar provided by RFC5322, here are the relevant lines:

to              =   "To:" address-list CRLF
address-list    =   (address *("," address)) / obs-addr-list
obs-addr-list   =   *([CFWS] ",") address *("," [address / CFWS])
address         =   mailbox / group   
group           =   display-name ":" [group-list] ";" [CFWS]

A simpler version of these 2 examples would be:

To: A: a@a;, b@b (eml-codec)

VS

To: A: a@a; b@b (mail-parser)

Is it a common error in the real world and we should support it? Or this is just a typo by the library author?

Currently eml-codec only support `,` to delimit multiple addresses (wether they are single or group addresses): ```eml To: "Colleagues": "James Smythe" <james@vandelay.com>;, Friends: jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>; ``` But mail-parser seems to support delimitation with `;`, as this is what is provided in their README: ```eml To: "Colleagues": "James Smythe" <james@vandelay.com>; Friends: jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>; ``` This clearly breaks the grammar provided by RFC5322, here are the relevant lines: ```ebnf to = "To:" address-list CRLF address-list = (address *("," address)) / obs-addr-list obs-addr-list = *([CFWS] ",") address *("," [address / CFWS]) address = mailbox / group group = display-name ":" [group-list] ";" [CFWS] ``` A simpler version of these 2 examples would be: ```eml To: A: a@a;, b@b (eml-codec) ``` VS ``` To: A: a@a; b@b (mail-parser) ``` Is it a common error in *the real world* and we should support it? Or this is just a typo by the library author?
quentin added the
cat
compat
label 2023-07-23 17:30:35 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Deuxfleurs/eml-codec#2
No description provided.