sventek@lbl-ws.arpa (08/24/84)
I hate to enter the fray, but it seems that the appropriate chapter and verse need to be quoted concerning the precise syntax required of the From: field in RFC822. The first quote comes from page 18 of RFC822: originator = authentic ; authenticated addr [ "Reply-To" ":" 1#address] ) authentic = "From" ":" mailbox ; Single author / ( "Sender" ":" mailbox ; Actual submittor "From" ":" 1#mailbox) ; Multiple authors ; or not sender As you can see from these two productions, the From field is required to have a single token of type "mailbox" if the sender is the same person that the message is from. If the sender is different, or there are multiple authors, then the sender must contain a single token of type "mailbox" indicating the sender, and the From field must contain one (or more) token of type "mailbox". The next quote provides the productions for "mailbox", and is extracted from page 27 of RFC822: mailbox = addr-spec ; simple address / phrase route-addr ; name & addr-spec route-addr = "<" [route] addr-spec ">" route = 1#("@" domain) ":" ; path-relative addr-spec = local-part "@" domain ; global address These productions indicate that the mailbox token is always of the form local-part@domain or phrase <[route]local-part@domain> The moral of the story (as I see it) is that if you let your users edit their own headers, then the composition utility must then check all of the headers which have precisely defined syntax requirements (such as From) for compliance with the spec. If there is an illegal header field, then two courses of action can be followed: the composer can try to set things right, or the message can be tossed back at the user. I think most systems opt for the first possibility. Regardless of the method used, the message must be made RFC822 compliant before the message leaves the composer's machine. Joe Sventek <sventek@lbl-ws.arpa>