> No, that is a wrong interpretation: day-of-week, ",", date, time, CFWS 
> are all syntatic tokens and [] means optional. The blanks between the 
> tokens do not belong to the syntax. If you generate a date-time with all 
> optional fields it would be
>
> day-of-week,datetimeCFWS
>
> without any blanks. Blanks could only be there if the tokens itself 
> include blank(s).
>
>
> Therefore you have to look for the definition of each token. In this 
> case the definition of date is relevant:
>
> date            =   day month year
>
> This means date is build of three tokens: day, month, year. Let's look 
> at day:
>
> day             =   ([FWS] 1*2DIGIT FWS) / obs-day
>
> This says a day can consist of one or two digits preceded by an optional 
> folding white space (FWS):
>
> FWS             =   ([*WSP CRLF] 1*WSP) /  obs-FWS
>
> A FWS can be a single WSP or a folded line.

Ooooh, that makes a lot more sense now! Thanks a lot for that, it does help!

> Therefore the date "Fri,  5 Jan 2024 16:48:37 -0500 (EST)" is 
> syntactically incorrect, because there can be only one blank between "," 
> and "5", not two by the syntax of RFC 5322. However, if you look at the 
> obs-*** definitions, they allow multiple WSPs which should not be 
> generated by new software. But a parser should be able to handle 
> multiple blanks.

That is totally consistent with what Wietse said! Now it feels like it would
make sense for isync to handle multiple blanks, though it is maybe overkill to
change their parsing everywhere. Maybe a compromise is to support multiple
blanks in this very place (now that we know that postfix tends to write two
blanks here), and at the same time to let my mail provider(s) know that I would
be glad if they updated to postfix 3.9 :-).

Thanks a lot!
Jonas
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to