[Dovecot] Fixing Timestamps

Steffen skdovecot at smail.inf.fh-brs.de
Sat Oct 5 00:54:42 EEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

LuKreme wrote:
> 
>> On Oct 2, 2013, at 1:28, Steffen Kaiser
>> <skdovecot at smail.inf.fh-brs.de> wrote:
>> 
>>> On Tue, 1 Oct 2013, LuKreme wrote: The messages were from 6
>>> months back, and the messages now show up in his mail client
>>> with the time stamp of the date they were restored, and not the
>>> date that shows up in the headers of the message.
>>> 
>>> Anything I can do?
>> 
>> You have to change the internal date. What storage do you use?
> 
> Maildir.
> 
>> With maildir: change the mtime of the message file to the desired
>> date.
> 
> Right, is there a simple way to do that? I hate to have to grep
> every message for a date and then convert it to epoch and rename
> the file, but it sounds like that's what's needed?

I guess not :-)

https://mikegriffin.ie/blog/20130226-change-the-timestamp-of-maildir-files/

I would change "grep '^Date:'" to "grep -i '^Date:'", because the
header keywords are case-insensitive as far as I know.

If you are fluet with perl, try
http://search.cpan.org/~dskoll/MIME-tools-5.504/lib/MIME/Parser.pm
http://search.cpan.org/~deian/Maildir-Lite-0.02/lib/Maildir/Lite.pm
has an example to scan Maildir.

- -- 
Steffen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQEVAwUBUk85Il3r2wJMiz2NAQJtIQgAubc44bQZCTZUJ9xzQEnzlAM3NrLbXB84
uEUzXC+HyxL/mBEL2Kp2KmZv3PP23HGKmPBwTgICiv5HXYJj5wTB6LKSWBtOvmVF
7WbUXT7wpgx9BWYiV6JWawYE1qXJORu/4pYw5mK83m+qaLYomdW7pdQMrKHmsfPt
eY59n2MJA+2SEULAmDajImGCP1ZeE3PeQyr3cL3EAoHzR9NS/06nqZ+21DfeoxaW
UCbrgZQGn2HQPznZrCkAE0wQzfI9EC5BluREmhLSgyP0QgbEB2pR7jO4mKz3ZxQ2
r/21QBprhEL3FKtCe0k4aAidZ2c5hU3tXoqmVGgJQyxa+ycBkR6U4Q==
=NbWz
-----END PGP SIGNATURE-----


More information about the dovecot mailing list