nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] To: (foo)

2017-11-26 11:10:17
Hi Tom,

Consider this 3 line test message:

    From: ted@example.com                                                     
                      
    To: (foo)                                                                 
                     
    Bcc: ted@example.com           

`To: (foo)' is invalid on the wire IIRC
https://tools.ietf.org/html/rfc5322 correctly.

nmh 1.6 however, empties out the To: header.

I wonder if there are users with `cc: (optional)' templates as a prompt.
:-)

I got the idea of using ( something here ) in the To: header as a way
of refering to a Dcc or Bcc list of addresses from:

    
https://serverfault.com/questions/743538/sendmail-support-of-empty-group-addresses-aka-list-syntax

IOW, sendmail's bug is not accepting an empty group address: `foo: ;'.

Would be nice if nmh would preserve the 

    To: (foo)

header.

Even if nmh could change to pass this to some local MTA, I don't think
it should change to preserve this in something that's meant to be RFC
5322 as it's in violation.  Here's a subset of RFC 5322's grammar.
Lines are followed down and right.

  to = "To:" address-list CRLF
  └─address-list = (address *("," address)) / obs-addr-list
    └─address = mailbox / group
      ├─mailbox = name-addr / addr-spec
      │ ├─name-addr = [display-name] angle-addr
      │ │ └─angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr
      │ │   ├─obs-angle-addr = [CFWS] "<" obs-route addr-spec ">" [CFWS]
      │ └───┴─┴─addr-spec = local-part "@" domain
      └─group = display-name ":" [group-list] ";" [CFWS]

So `to' must have a literal "@" from `addr-spec' or a literal ":" from
`group'.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>