[offlineimap] Removal of "maxage" for imap-to-imap sync in 6.5.7 causes duplication of messages on sync (#242)

Lars Möllendorf notifications at github.com
Sat Oct 3 16:22:56 BST 2015


> I don't see that cur/tmp/new are existing before the first sync, above.

Sorry, a copy paste error.

> Why don't you use rules like `foldername.replace('Entwurf', '.drafts')`
> with the dot?

This approach was not obvios to me. I used the same nametrans rules for
imap-to-imap sync and back then there was no need to translate from mailbox name to
Maidir path.

> I'd say you have to fix your nametrans rules. OfflineIMAP looks to do
> the right thing.

So I have to setup a rule for each and every folder name? And whenever I add a
folder I have to adjust the offlineimap config?

I now have these rules:

```
nametrans = lambda foldername: foldername.replace('.drafts', 'Entwurf').replace('.trash', 'Papierkorb').replace('.sent', 'Gesendet').replace('/', 'INBOX').replace('.ads', 'ads').replace('.archive', 'archive').replace('.forums', 'forums').replace('.providers', 'providers').replace('.support', 'support').replace('.webshops', 'webshops')

nametrans = lambda foldername: foldername.replace('Entwurf', '.drafts').replace('Papierkorb', '.trash').replace('Gesendet', '.sent').replace('INBOX', '/').replace('ads', '.ads').replace('archive', '.archive').replace('forums', '.forums').replace('providers', '.providers').replace('support', '.support').replace('webshops', '.webshops')
```

And no dotless folders are created in the Maildir anymore. However, the error about '/' still exists:

```
OfflineIMAP 6.5.7
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
Account sync hermes at whatever.org:
 *** Processing account hermes at whatever.org
 Establishing connection to imap.whatever.org:993
 Creating folder /[hermes at whatever.org-Remote]
 ERROR: Creating folder  on repository hermes at whatever.org-Remote
  Folder '/'[hermes at whatever.org-Remote] could not be created. Server responded: ('NO', ['unsupported folder name'])
 ERROR: Folder '/'[hermes at whatever.org-Remote] could not be created. Server responded: ('NO', ['unsupported folder name'])
 *** Finished account 'hermes at whatever.org' in 0:00
ERROR: Exceptions occurred during the run!
ERROR: Creating folder  on repository hermes at whatever.org-Remote
  Folder '/'[hermes at whatever.org-Remote] could not be created. Server responded: ('NO', ['unsupported folder name'])

Traceback:
  File "/usr/lib64/python2.7/site-packages/offlineimap/repository/Base.py", line 242, in sync_folder_structure
    src_repo.makefolder(dst_name_t)
  File "/usr/lib64/python2.7/site-packages/offlineimap/repository/IMAP.py", line 434, in makefolder
    OfflineImapError.ERROR.FOLDER)

ERROR: Folder '/'[hermes at whatever.org-Remote] could not be created. Server responded: ('NO', ['unsupported folder name'])

Traceback:
  File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 263, in syncrunner
    self.__sync()
  File "/usr/lib64/python2.7/site-packages/offlineimap/accounts.py", line 329, in __sync
    remoterepos.sync_folder_structure(localrepos, statusrepos)
  File "/usr/lib64/python2.7/site-packages/offlineimap/repository/Base.py", line 242, in sync_folder_structure
    src_repo.makefolder(dst_name_t)
  File "/usr/lib64/python2.7/site-packages/offlineimap/repository/IMAP.py", line 434, in makefolder
    OfflineImapError.ERROR.FOLDER)
```

Are these nametrans rules wrong?:

```
[...].replace('/', 'INBOX')[...]
[...].replace('INBOX', '/')[...]
```

> I don't know if the fs layout can help but the "INBOX path" section in
> http://wiki.dovecot.org/MailLocation looks very interesting for you.

Do you mean I should move my local INBOX to .INBOX or something like that?

---
Reply to this email directly or view it on GitHub:
https://github.com/OfflineIMAP/offlineimap/issues/242#issuecomment-145256189
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20151003/f090b771/attachment-0002.html>


More information about the OfflineIMAP-project mailing list