I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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?
-- I AM NOT A LICENSED HAIRSTYLIST Bart chalkboard Ep. AABF04
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 1 Oct 2013, LuKreme wrote:
Except.
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?
With maildir: change the mtime of the message file to the desired date. remove dovecot-uidlist and dovecot.index.cache to force a fill resync.
If your message file looks like: 1377237376.M533007P21292.<host>,S=884,W=905:... change the first number to the seconds since epoch, maybe these numbers have some internal meaning as well for internal date.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkvLKF3r2wJMiz2NAQLoDgf/Xq4LhpDHxmEa7ORV+hungTeu5nWHbGwf Ih5v3HDQ3R6yL0yEq04Vf8J8spqg1Pt8rHnUQd3fC/xLHbRBV8+n2XJdD5yH99fD j265mJPo8GO8sN40Z3ABlJdZa1YFlQZDa/zKclwEGotH3OxnXHE2LiqcuNjq6lt7 xODimr3M5fuVnYDwnH6XL4LxZXjYEHZ3zR1g7aIBsiQEvAgUBsocdjks7FcqFyzR Turd+sw65G3Qq5u81CmFNY0gbxETCvR2M/xsH6/imk3LGkD8kKTb8ohA+dvUpd/3 DGsFYLdR6GW8Y1LAtzaia4YnnbJ+RM1PsRpssuOzQ/vwlShDujYH1g== =tgbO -----END PGP SIGNATURE-----
On Oct 2, 2013, at 1:28, Steffen Kaiser skdovecot@smail.inf.fh-brs.de wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 1 Oct 2013, LuKreme wrote:
Except.
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?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
LuKreme wrote:
On Oct 2, 2013, at 1:28, Steffen Kaiser skdovecot@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-----
W dniu 02.10.2013 01:42, LuKreme pisze:
I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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? Hi! Does procmail add header Delivery-date: ? Can you compare headers of email before and after procmail delivered it? Marcin
On 2013-10-01 7:42 PM, LuKreme kremels@kreme.com wrote:
I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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?
Fix your restore script/methodology, then restore them again...
--
Best regards,
*/Charles/*
On 02 Oct 2013, at 11:51 , Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2013-10-01 7:42 PM, LuKreme kremels@kreme.com wrote:
I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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?
Fix your restore script/methodology, then restore them again…
That would just move the grep/convert/rename into the restore process.
Maildir saves the file with the epoch timestamp of the time the file is saved.
-- The cat turned and tried to find a place of safety in the suit's breastplate. He was beginning to doubt he'd make it through the knight.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
LuKreme wrote:
On 02 Oct 2013, at 11:51 , Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2013-10-01 7:42 PM, LuKreme kremels@kreme.com wrote:
I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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?
Fix your restore script/methodology, then restore them again?
That would just move the grep/convert/rename into the restore process.
Maildir saves the file with the epoch timestamp of the time the file is saved.
you re-submit the message into the message transfer process, hence the message is new and not the original "backup"ed message. If you would backup and restore the file from/to the Maildir without procmail a.s.o. you would have the original message.
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBUk80E13r2wJMiz2NAQKEwQf+Lrps5g2y36ONPmkV4A44DdFB/1q5lF8/ tJReF/YfWyqM6SlFW07HsfJet1Sl8eEAd9EMVmjbbMk6kVZsSGBRTAYn03myHZbd m4dHznmw+X4dhGx5k/NInSlLLBV8RKCjR+SKXnKbHxw7EA1SFNs0r/6U06wR5MwV 20KKSyHpS2s3mNsCQzG0U56AEUj1oIwXJfk6LJBPPMOs1kbGFk7FD21BSrdf3xHc JZKBbUMZ2N57csa8i88rUSd/wtt5hw9QtDS9H7fyLiqPy3bfz6/MSEJv/vBVw7Gz PA0oUmOoAMh27IJg1KZNaN0FCyT8K/zafy4B2JZWOHc6f+jQYjmSEQ== =i8Gp -----END PGP SIGNATURE-----
On 04 Oct 2013, at 15:33 , Steffen skdovecot@smail.inf.fh-brs.de wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
LuKreme wrote:
On 02 Oct 2013, at 11:51 , Charles Marcus CMarcus@Media-Brokers.com wrote:
On 2013-10-01 7:42 PM, LuKreme kremels@kreme.com wrote:
I have a user with a lot of email (A LOT of email, probably over 500,000 emails). Recently, several thousand messages of his were lost, and I pulled them out of the backup archives (zip files containing each days emails in an mbox) that are created on his account and fed them into his procmail scripts and they were all processed just fine and ended up in the right directories.
Except.
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?
Fix your restore script/methodology, then restore them again?
That would just move the grep/convert/rename into the restore process.
Maildir saves the file with the epoch timestamp of the time the file is saved.
you re-submit the message into the message transfer process, hence the message is new and not the original "backup"ed message. If you would backup and restore the file from/to the Maildir without procmail a.s.o. you would have the original message.
The backup messages are not in a maildir, they are stored in daily gzip files.
-- I SAW NOTHING UNUSUAL IN THE TEACHER'S LOUNGE Bart chalkboard Ep. 8F17
participants (5)
-
Charles Marcus
-
LuKreme
-
Marcin Mirosław
-
Steffen
-
Steffen Kaiser