Many times, I get mail from folks whose MUA is not configured right,
broken, whatever, and their Date: header is either missing,incorrect or
malformed.
Examples:
1. Time zone missing
2. Year is wrong (1970, 1995 are common mistakes, I dont know why)
This causes the message to get threaded/sorted incorrectly when I view it
in my MUA.
I was wondering: Since the first Received: header in the message (deepest
in the headers) indicates contains the time that the message was handed off
to the initial MTA, this is a pretty good approximation to what the Date:
header "should" be. And, IMO, a MTA is much much less likely to be
mis-configured than a MUA and so the date present in this header is pretty
accurate.
That said, and assuming a "default" Received: header format, how can I
stuff this date into Date: header? Lots of parsing involved, eh?
Ideas?
Thanks,
Vikas