Sync -> Mails there. Sync -> mails gone

Matthias Beyer mail at beyermatthias.de
Thu Jan 29 14:31:34 GMT 2015


Hi Sebastian,

I tried what you suggest (with an new temporary mail account, though.
I don't want to hurt my mail box any more... I guess I already lost
some mail from there,...)

So here are my settings:

    [Account blaweb]

    localrepository = LocalBLAWEB
    remoterepository = RemoteBLAWEB

    [Repository LocalBLAWEB]
    type = Maildir
    localfolders = ~/.mail/
    sep = .
    folderfilter = lambda f: f.startswith("bla_12")
    nametrans = lambda f: re.sub("^bla_12\.", "", f)

    [Repository RemoteBLAWEB]
    type = IMAP
    remotehost = imap.web.de
    ssl = no
    remoteuser = bla_12
    nametrans = lambda f: "bla_12." + re.sub("^INBOX\.", "", f)
    createfolders = True

As you can see, I have no sub-folders remotely by now. It is a
"web.de" box, which has only the following folders:

    bla_12.Entwurf
    bla_12.Gesendet
    bla_12.INBOX
    bla_12.Papierkorb
    bla_12.Postausgang
    bla_12.Spam
    bla_12.Unbekannt

These folders got created on my first sync, as I want it. But when
syncing now, I get this output:

    OfflineIMAP 6.5.5
      Licensed under the GNU GPL v2+ (v2 or any later version)
    Account sync blaweb:
     *** Processing account blaweb
     Establishing connection to imap.web.de:143
    Enter password for account 'RemoteBLAWEB':
    Folder Gesendet [acc: blaweb]:
     Syncing Gesendet: IMAP -> Maildir
    Folder Entwurf [acc: blaweb]:
     Syncing Entwurf: IMAP -> Maildir
    Folder INBOX [acc: blaweb]:
     ERROR: ERROR in syncfolder for blaweb folder bla_12.INBOX: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 399, in syncfolder
        statusrepos.getsep()))
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/LocalStatus.py", line 105, in getfolder
        self.import_other_backend(folder)
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/LocalStatus.py", line 68, in import_other_backend
        folderbk = dic['class'](folder.name, repobk)
      File "/usr/lib/python2.7/site-packages/offlineimap/folder/LocalStatusSQLite.py", line 59, in __init__
        self.connection = sqlite.connect(self.filename, check_same_thread = False)
    OperationalError: unable to open database file

      unable to open database file
    Folder Papierkorb [acc: blaweb]:
     Syncing Papierkorb: IMAP -> Maildir
    Folder Postausgang [acc: blaweb]:
     Syncing Postausgang: IMAP -> Maildir
    Folder Spam [acc: blaweb]:
     Syncing Spam: IMAP -> Maildir
    Folder Unbekannt [acc: blaweb]:
     Syncing Unbekannt: IMAP -> Maildir
    Account sync blaweb:
     *** Finished account 'blaweb' in 0:03
    ERROR: Exceptions occurred during the run!
    ERROR: ERROR in syncfolder for blaweb folder bla_12.INBOX: Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 399, in syncfolder
        statusrepos.getsep()))
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/LocalStatus.py", line 105, in getfolder
        self.import_other_backend(folder)
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/LocalStatus.py", line 68, in import_other_backend
        folderbk = dic['class'](folder.name, repobk)
      File "/usr/lib/python2.7/site-packages/offlineimap/folder/LocalStatusSQLite.py", line 59, in __init__
        self.connection = sqlite.connect(self.filename, check_same_thread = False)
    OperationalError: unable to open database file

      unable to open database file


When doing what you suggested:


> nametrans = lambda foldername: re.sub("INBOX\.INBOX","INBOX",
> re.sub('^localPREFIX\.', 'INBOX.', foldername))
>

It warns me that this would lead to a infinite folder creation:

    OfflineIMAP 6.5.5
      Licensed under the GNU GPL v2+ (v2 or any later version)
    Account sync blaweb:
     *** Processing account blaweb
     Establishing connection to imap.web.de:143
    Enter password for account 'RemoteBLAWEB': 
     ERROR: INFINITE FOLDER CREATION DETECTED! Folder 'bla_12.Gesendet' (repository 'LocalBLAWEB') would be created as folder 'INBOX/Gesendet' (repository 'RemoteBLAWEB'). The latter becomes 'bla_12.INBOX.Gesendet' in return, leading to infinite folder creation cycles.
     SOLUTION: 1) Do set your nametrans rules on both repositories so they lead to identical names if applied back and forth. 2) Use folderfilter settings on a repository to prevent some folders from being created on the other side.
     *** Finished account 'blaweb' in 0:03
    ERROR: Exceptions occurred during the run!
    ERROR: INFINITE FOLDER CREATION DETECTED! Folder 'bla_12.Gesendet' (repository 'LocalBLAWEB') would be created as folder 'INBOX/Gesendet' (repository 'RemoteBLAWEB'). The latter becomes 'bla_12.INBOX.Gesendet' in return, leading to infinite folder creation cycles.
     SOLUTION: 1) Do set your nametrans rules on both repositories so they lead to identical names if applied back and forth. 2) Use folderfilter settings on a repository to prevent some folders from being created on the other side.

    Traceback:
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 241, in syncrunner
        self.__sync()
      File "/usr/lib/python2.7/site-packages/offlineimap/accounts.py", line 306, in __sync
        remoterepos.sync_folder_structure(localrepos, statusrepos)
      File "/usr/lib/python2.7/site-packages/offlineimap/repository/Base.py", line 233, in sync_folder_structure
        OfflineImapError.ERROR.REPO)

So I'm literally lost now... Don't know what's wrong here...

-- 
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer

Proudly sent with mutt.
Happily signed with gnupg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20150129/1b37d60b/attachment-0003.sig>


More information about the OfflineIMAP-project mailing list