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):
johnsmith@example.org-inbox-2015-07-28T20.02.14+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)