[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
Mon Sep 28 20:08:54 BST 2015


nicolas33: Yes, you are right. I mixed up syncing the cache with the actual
state of the Maidir and syncing of the data held in RAM to the file system.

I tried to sync between IMAP and Maildir without success.

Before syncing with offlineimap I had these folders in Maildir:

```
.ads
.archive
.drafts
.forums
.providers
.sent
.support
.trash
.webshops
cur
new
tmp
```
After syncing with offlineimap I get this folders:

```
.
..
.ads
.archive
.drafts
.forums
.providers
.sent
.support
.trash
.webshops
INBOX
Postausgang
cur
drafts
maildirfolder
new
sent
subscriptions
tmp
trash
```

I don't know where the folders "maildirfolder" and "subscriptions" come from.
Maybe the e-mail provider added those.

Additionally I get this errror:

```
$ offlineimap -c /home/user/offlineimapfiles/offlineimaprc.hermes
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 Postausgang[hermes at whatever.org-Local]
 Creating folder drafts[hermes at whatever.org-Local]
 Creating folder INBOX[hermes at whatever.org-Local]
 Creating folder trash[hermes at whatever.org-Local]
 Creating folder sent[hermes at whatever.org-Local]
 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)
```

This is my config:

```
[general]
accounts = hermes at whatever.org
maxsyncaccounts = 6
status_backend = plain
ui = TTYUI

[Account hermes at whatever.org]
localrepository = hermes at whatever.org-Local
remoterepository = hermes at whatever.org-Remote

[Repository hermes at whatever.org-Local]
type = Maildir
localfolders = "/home/user/Maildir/hermes at whatever.org"
maxage = 720
nametrans = lambda foldername: foldername.replace('drafts', 'Entwurf').replace('trash', 'Papierkorb').replace('sent', 'Gesendet')

[Repository hermes at whatever.org-Remote]
type = IMAP
remotehost = imap.whatever.org
remoteuser = hermes at whatever.org
ssl = yes
remotepassfile = ~/offlineimapfiles/Password.IMAP.hermes at whatever.org
nametrans = lambda foldername: foldername.replace('Entwurf', 'drafts').replace('Papierkorb', 'trash').replace('Gesendet', 'sent')
```

And here are my questions:

* Can I tell offlineimap to respect the existing dovecot Maildir structure and use leading dots for the mail folders?
* What does the error message mean? Is offlineimap misinterpreting the leading dots of the mail folders and trying to create a root folder ('/') ?



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


More information about the OfflineIMAP-project mailing list