I've got a few maildirs I grabbed with getmail (both inbox and sent) and I want to give the eml files names that represent the date and time each mail has arrived (or was sent):
[email protected]+0000.eml
(I want Windows to read the files, so no colons)
I've noticed that there is only one occurence of "Date: " inside the eml files:
Date: Tue, 28 Jul 2015 20:02:14 +0000
Can I rely on this piece of header to rename the files? Is it reliable?
(I plan to write a posix or bash script for this task)
Received: from imap.gmx.com (XXX.XXX.XXX.XXX:993) by playbox.example.org with IMAP4-SSL; 19 Sep 2014 00:46:11 -0000
andDate: Fri, 09 May 2014 02:18:17 +0200
. I received the mail on 2014-05-09 and I fetched it with getmail on 2014-09-19. – Deegan