Commit | Line | Data |
---|---|---|
d927792b TJ |
1 | Small tool to fix the IMAP internaldate |
2 | in case it's too much off compared to the last date | |
3 | stored in the received lines. | |
4 | ||
5 | F.e. some IMAP clients tend to reset the imap internaldate | |
6 | when you move a message between folders. | |
7 | ||
8 | Features: | |
9 | - Configurable tolerance | |
10 | - Test mode: Show only what would be done | |
11 | - Statistics: How many messages it would modify per user / folder | |
12 | - Log file with all actions | |
13 | - Caching | |
14 | ||
e2c5a802 | 15 | Note: Only the -first- received line is interpreted. |
002533ab TJ |
16 | This was the lastest date on our server. We don't interpret |
17 | all received lines because spam messages tend to contain bogus dates. | |
91aca3c4 TJ |
18 | |
19 | If no recieved line is found, you can enable a fallback | |
20 | mechanism to the "Date:" header in the configuration file. | |
21 | This is useful for correcting "Sent" items. | |
002533ab | 22 | |
e2c5a802 TJ |
23 | |
24 | By default the script runs in test mode and does not modify any messages. | |
22e0b9e7 TJ |
25 | When you run it for the first time, it will create the configuration file. |
26 | Adapt the settings to your needs and re-run the script. | |
27 | ||
28 | If you are fine with the actions, you can enable the update mode in the config. | |
e2c5a802 | 29 | |
002533ab | 30 | Prerequisites: |
b9d95e2a | 31 | Python version 3 or later. Also tested with python 2.7. |
002533ab | 32 | |
8a36cfd2 TJ |
33 | Linux: Should be part of any modern linux distribution |
34 | Windows: Get it from http://www.python.org/getit/windows/ | |
35 | ||
97bd6bea PD |
36 | Necessary files: |
37 | - userdata.csv: Contains information necessary for the user session with format: | |
1007fa6d TJ |
38 | username,password |
39 | testuser1,testpass1 | |
40 | testuser2,testpass2 | |
41 | ||
42 | Note: The first line are the column names and gets ignored. | |
002533ab | 43 | |
97bd6bea | 44 | Produced files: |
1007fa6d TJ |
45 | - fix_imap_internaldate.cfg: Configuration of the script - created on first run. |
46 | - fix_imap_internaldate.log: Log file. Will be truncated on script invocation. | |
91aca3c4 | 47 | - statistics.txt: Final report on statistics about detected date conflicts and missing dates. |
1007fa6d | 48 | - message_cache.dat: Cache file used for performance improvements |
97bd6bea | 49 | |
002533ab | 50 | For more information please contact opensource@intra2net.com |