Below syntax seems to be obsolete for me:
RFC 5321 4.4
From-domain = "FROM" FWS Extended-Domain
By-domain = CFWS "BY" FWS Extended-Domain
Extended-Domain = Domain / ( Domain FWS "(" TCP-info ")" ) / (
address-literal FWS "(" TCP-info ")" )
TCP-info = address-literal / ( Domain FWS address-literal )
How TCP-info parsed ?
The problem is if no TCP-info prsesnet and CFWS between By-domain
Received: from domain.com (host.domain.com 10.0.0.1) by ... - contains
Received: from domain.com (this is comment text) by ... - contains
comment and not optional TCP-info
Do i miss something or in real-life you can't be sure if TCP-info or
comment was supplied ?
You can't be sure. The syntax is overloaded.
(Just guessing if commect = address-literal or comment argument2 =
address-literal is just not best option)
I'm afraid it's pretty much the only option.