From dcc7692bd19910be63b0af54fa4303d54d066383 Mon Sep 17 00:00:00 2001 From: Gene Hightower Date: Thu, 28 Mar 2024 20:52:35 -0700 Subject: [PATCH] still must match obs first --- lib/message-parser.pegjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/message-parser.pegjs b/lib/message-parser.pegjs index cd20f2a..75d5527 100644 --- a/lib/message-parser.pegjs +++ b/lib/message-parser.pegjs @@ -242,11 +242,15 @@ group_list = mailbox_list / CFWS / obs_group_list // 3.4.1. Addr-spec specification // -addr_spec = local_part "@" domain +addr_spec = obs_addr_spec / new_addr_spec -local_part = obs_local_part / dot_atom / quoted_string +new_addr_spec = local_part "@" domain -domain = obs_domain / dot_atom / domain_literal +obs_addr_spec = obs_local_part "@" obs_domain + +local_part = dot_atom / quoted_string + +domain = dot_atom / domain_literal domain_literal = CFWS? "[" (FWS? dtext)* FWS? "]" CFWS? @@ -997,7 +1001,7 @@ obs_group_list = (CFWS? ",")+ CFWS? obs_local_part = word ("." word)* -obs_domain = atom ("." atom)* +obs_domain = (atom ("." atom)*) / domain_literal obs_dtext = obs_NO_WS_CTL / quoted_pair