Fix dates via IMAP on messages
Lyndon Nerenberg
lyndon at orthanc.ca
Tue Jul 18 17:36:37 UTC 2006
> All of my new mail is fine (I run my mailserver now) but my mail from
> about 7-10 years ago is all the date of the migration. Is there any
> program out there that will read the headers of the mail and change the
> server-date of the files? I've tried imapsync with -syncinternaldate, to
> see if it read headers, but it doesn't. I just want to be able to run
> the command on the user/imap server of choice, and have it read all the
> mail headers, and set the creation dates properly on the mails (all via
> IMAP).
I'm not aware of a tool that will do this, but writing a program to handle
this is trivial. All it needs to do is read the message until you find the
date header, parse the date, then call utimes() to update the file's
mtime.
If you need an RFC822 date parser, look for the infamous getdate.y.
--lyndon
More information about the freebsd-isp
mailing list