Sync -> Mails there. Sync -> mails gone
Sebastian Spaeth
Sebastian at SSpaeth.de
Thu Jan 29 16:08:45 GMT 2015
> ERRROR: INFINITE FOLDER CREATION DETECTED! Folder 'bla_12.Gesendet'
(repository 'LocalBLAWEB') would be created as folder 'INBOX/Gesendet'
(repository 'RemoteBLAWEB').
Ahem, all your nametransrule are in a way that suppose "." as mailbox
delimiter. If your Remote Repository is using "/" as delimiter (as it
seems to be), you need to create your nametrans rules accordingly.
So your current remote nametrans rule:
nametrans = lambda f: "bla_12." + re.sub("^INBOX\.", "", f)
would probably need to be (untested):
nametrans = lambda f: "bla_12." + re.sub("^INBOX\\", "", f)
nametrans rules ARE tricky :-).
Sebastian
On 29.01.2015 15:31, Matthias Beyer wrote:
> 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...
>
>
>
> _______________________________________________
> OfflineIMAP-project mailing list: OfflineIMAP-project at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>
> OfflineIMAP homepages:
> - https://github.com/OfflineIMAP
> - http://offlineimap.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20150129/98a500b9/attachment-0003.sig>
More information about the OfflineIMAP-project
mailing list