procmail
[Top] [All Lists]

Re: Check for RFC822 Date

1999-11-10 09:40:43
Rejo Zenger <subs(_at_)sisterray(_dot_)xs4all(_dot_)nl> writes:
++ 09/11/99 18:41 -0600 - Philip Guenther:
Rejo Zenger <subs(_at_)sisterray(_dot_)xs4all(_dot_)nl> writes:
++ 09/11/99 10:43 -0800 - Mike de Laine:
You may also want to allow for trailing comments in dates such as:

Date: Tue, 09 Nov 1999 07:12:52 -0800 (PST) 

The recipe i use now [*$ ! ^Date:$ws($day,$ws)$date$ws$time] already
leaves that space at it does not specify what comes after $time (or what
is after the last part of $time).

I did not include it in the recipe as the RFC doesn't say anything about
that. It's not requested.

Well, since the rfc syntax doesn't show anything after the timezone,
nothing but CFWS (Comments/Folding WhiteSpace) is permitted.

Ok. This would mean a Date field like Mike mentioned

 Date: Tue, 09 Nov 1999 07:12:52 -0800 (PST)

would be invalid because these comments after the zone specification is
not allowed? It should either have the numerical or lexical zone
token, correct? 

No, it's valid because comments and whitespace are allowed between any
two tokens in the syntax of structured header fields (of which Date:
is one), including right before the CRLF pair that terminates the field.
(Note that the CRLF pair has almost certainly been turned into just a LF
by the MTA before procmail gets to the message.)


Philip Guenther

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