Fix dates via IMAP on messages

Cody Baker cody at wilkshire.net
Tue Jul 18 02:50:20 UTC 2006


I doubt there's anything out there automagically does it, but it 
wouldn't be terrible to write.  "In theory" (With huge sarcastic quotes 
around that) the e-mail dates follow the format described at 
http://www.w3.org/Protocols/rfc822/#z28 .   There's probably a lot of 
messages that deviate from that, but by in large you should be able to 
use them.  Just use a text processing language (like Perl), pull out the 
date field, and convert it into the format accepted by touch and modify 
the file date from that.  Recurse through all of the files and enjoy. 

Thank You,

Cody Baker
cody at wilkshire.net


David J. Orman wrote:
> Hi,
>
> I've got a curious problem. Due to a bad migration many years ago (via maildir cp's) by one of the admins at my ISP, I've got a mess when trying to view webmail. The webmail client (no, this is not something I can change) relies on server-date for email dates, instead of looking at the email headers. The server-based date for the mail is of course the file creation/modification time, and cp -p was not used apparently. 
>
> 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). 
>
> Any help would be much appreciated!
> David
> _______________________________________________
> freebsd-isp at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-isp
> To unsubscribe, send any mail to "freebsd-isp-unsubscribe at freebsd.org"
>   



More information about the freebsd-isp mailing list