procmail
[Top] [All Lists]

Re: Check for RFC822 Date

1999-11-10 01:28:32
++ 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? 

Also, you left out a $ws before the comma, and the question-mark to
make the parenthesised expression optional:

      *$ ! ^Date:$ws($day$ws,$ws)?$date$ws$time$ws$

Yes. Weird things is that i already enclosed the expression in
parenthesis [original regexp: $ws($day,$ws)$date$ws$time], but forgot to
add the question mark. Thanks for correcting.

        -Rejo.

-- 
= Rejo Zenger  [Sister Ray Crisiscentrum]               
rejo(_at_)sisterray(_dot_)xs4all(_dot_)nl
= http://mediaport.org/~sister                                  PGP: see headers
--------------------------------------------------------------------------------

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