Small tool to fix the IMAP internaldate in case it's too much off compared to the last date stored in the received lines. F.e. some IMAP clients tend to reset the imap internaldate when you move a message between folders. Features: - Configurable tolerance - Test mode: Show only what would be done - Statistics: How many messages it would modify per user / folder - Log file with all actions - Caching Note: Only the -first- received line is interpreted. This was the lastest date on our server. We don't interpret all received lines because spam messages tend to contain bogus dates. If no recieved line is found, you can enable a fallback mechanism to the "Date:" header in the configuration file. This is useful for correcting "Sent" items. By default the script runs in test mode and does not modify any messages. When you run it for the first time, it will create the configuration file. Adapt the settings to your needs and re-run the script. If you are fine with the actions, you can enable the update mode in the config. Prerequisites: Python version 3 or later. Also tested with python 2.7. Linux: Should be part of any modern linux distribution Windows: Get it from http://www.python.org/getit/windows/ Necessary files: - userdata.csv: Contains information necessary for the user session with format: username,password testuser1,testpass1 testuser2,testpass2 Note: The first line are the column names and gets ignored. Produced files: - fix_imap_internaldate.cfg: Configuration of the script - created on first run. - fix_imap_internaldate.log: Log file. Will be truncated on script invocation. - statistics.txt: Final report on statistics about detected date conflicts and missing dates. - message_cache.dat: Cache file used for performance improvements For more information please contact opensource@intra2net.com