Hi,
I get some email with unusual date formats, eg:
Date: Wed Mar 21 07:23:08 AST 2001
I'd like to set up a procmail recipe that spots this, and rewrites the Date
field.
What approach would you recommend, so far I've thought of looking for the
presence of three consecutive capitals in the Date: header, and then:-
i) Use formail to mend the header I
However, it's not clear from the man pages whether formail will fill in the
time/date if asked to replace the Date: header in a message. It doesn't say
it does, so I suspect it doesn't.
ii) Use formail to mend the header II
Assuming formail's adding of a Date: header does need the date/time as a
parameter, is there an easy way to read the date from the system in the
right format?
iii) Do fancy stuff with regexps
I'm not even sure this is possible with procmail's regexps, but I was
thinking of matching on the AST, which I know to be -0400, and then
re-ordering the time/date parameters into the standard layout of Wed, 21
Mar 2001 11:36:48 -0400
Any suggestions?
thanks in advance,
Alan
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail