On 2015-04-04 17.27.47 -0700, Philip Guenther wrote:
> On Sat, Apr 4, 2015 at 5:19 PM, Mike Burns <[email protected]> 
> wrote:
> > Running into issues with the extra semicolons in OpenSMTPD's Received
> > header. I see that these semicolons are now removed in -portable[1]. Any
> > reason not to get rid of them in base, too?
> ...
> > -               fprintf(s->ofile, "\t%s\n", time_to_text(time(NULL)));
> > +               fprintf(s->ofile, ";\n\t%s\n", time_to_text(time(NULL)));
> 
> The other removals are correct, but this one is wrong.  A Received:
> header field should have exactly one (unquoted, non-comment)
> semicolon: before the date-time at the end of the line.  To quote
> rfc5321:
> 
>    Stamp          = From-domain By-domain Opt-info [CFWS] ";"
>                   FWS date-time
> 
> ...and there are no other explicit semicolons in the syntax.

I agree with your analysis of the grammar, but I believe that is what
the code is doing. That line in question is the one that puts the bare
semicolon before the date-time. The newlines have been re-arranged so
that the semicolon occurs at the end of the line.

Or am I misunderstanding you/the RFC?

-Mike

Reply via email to