doc:appunti:linux:sa:offlineimap3_nametrans
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:linux:sa:offlineimap3_nametrans [2024/03/22 11:13] – niccolo | doc:appunti:linux:sa:offlineimap3_nametrans [2024/03/22 11:19] – [Testing the nametrans option] niccolo | ||
---|---|---|---|
Line 17: | Line 17: | ||
* The " | * The " | ||
- | In this case we need a very special **nametrans** expression. | + | In this case we need a very special **nametrans** expression |
:!: **NOTICE**: The mapping of the top-level folders under the INBOX during the transfer from IMAP to Maildir prevents the reverse mapping from Maildir to IMAP, therefore only synchronization from IMAP to Maildir will be possible and not vice versa. | :!: **NOTICE**: The mapping of the top-level folders under the INBOX during the transfer from IMAP to Maildir prevents the reverse mapping from Maildir to IMAP, therefore only synchronization from IMAP to Maildir will be possible and not vice versa. | ||
+ | |||
+ | ===== Testing the nametrans option ===== | ||
It is possibile to write a simple Python script to test the **nametrans** expression: | It is possibile to write a simple Python script to test the **nametrans** expression: | ||
Line 67: | Line 69: | ||
:!: **NOTICE**: The translated name of a sub-subfolder contains the original **directory separator** (.e.g. '' | :!: **NOTICE**: The translated name of a sub-subfolder contains the original **directory separator** (.e.g. '' | ||
+ | |||
+ | ===== The configuration file ===== | ||
+ | |||
+ | < | ||
+ | [general] | ||
+ | accounts = CopyFromIMAP | ||
+ | |||
+ | [Account CopyFromIMAP] | ||
+ | remoterepository = OldServer | ||
+ | localrepository = NewServer | ||
+ | |||
+ | [Repository OldServer] | ||
+ | type = IMAP | ||
+ | nametrans = lambda foldername: re.sub(r' | ||
+ | remotehost = mail.oldserver.com | ||
+ | remoteuser = username@oldserver.com | ||
+ | remotepass = MySecret | ||
+ | createfolders = False | ||
+ | |||
+ | [Repository NewServer] | ||
+ | type = Maildir | ||
+ | localfolders = / | ||
+ | </ | ||
===== Web References ===== | ===== Web References ===== |
doc/appunti/linux/sa/offlineimap3_nametrans.txt · Last modified: 2024/03/22 11:23 by niccolo