procmail
[Top] [All Lists]

RE: Check for RFC822 Date

1999-11-09 11:49:07

Hi,

I have tried to create a recipe that looks for a non RFC822 compliant
Date field in the header of a message.

The variables and the recipe:

  day        = "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)"
  digit      = "[0-9]"
  month      = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"
  date       = "$digit?$digit $month $digit$digit"
  hour       = "$digit$digit:$digit$digit(:$digit$digit)?"
  zone       = 
"(UT|GMT|EST|EDT|CST|CDT|MST|MDT|PST|PDT|([A-I]|[K-Z])) (+|-) 
$digit$digit$digit$digit"
  time       = "$hour $zone"

You may also want to allow for trailing comments in dates such as:

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

        Mike

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