Error with seperator handling?
HeX
dietmarw at gmx.de
Fri Dec 2 09:36:14 GMT 2011
Hi,
thanks for the fix. It will now continue only your version 8ec6980 on
next (have not tested niclas33 master) seems to have the following problems:
1. It does not care about the `readonly = yes`. It just deleted happily
some of the mails from my readonly local which were deleted on the
remote side.
2. No matter what I tell the folderfilter it simply just synchs all
folders from local to remote. As a test I lightly changed my config to
this: https://gist.github.com/8317c02e1a16fbc56eec
and what I get is still
...
Copy message -11205 (2 of 11205) IMAP:Sent -> GMAIL
...
3. Something else seems to be broken since I get these messages during sync
Folder [Gmail]/All Mail [acc: TEST]:
ERROR: Aborting sync, folder '[Gmail].All Mail' [acc: 'TEST']
Error SELECTing mailbox '[Gmail].All Mail', server reply:
('NO', ["Mailbox doesn't exist: [Gmail].All Mail"])
Folder [Gmail]/Drafts [acc: TEST]:
ERROR: Aborting sync, folder '[Gmail].Drafts' [acc: 'TEST']
Error SELECTing mailbox '[Gmail].Drafts', server reply:
('NO', ["Mailbox doesn't exist: [Gmail].Drafts"])
...
This might actually be related to 1. since actually offline imap should
not care about folders that are not present on the read-only local side
but on the remote side.
4. It looks like `sep = /` was not necessary for the Gmail account
after all. So either `sep = ` is simply ignored or the Gmail API works
simply with both.
/HeX
On 01/12/11 10:44, Sebastian Spaeth wrote:
> On Fri, 18 Nov 2011 10:23:21 +0100, HeX <dietmarw at gmx.de> wrote:
>> I was trying to run offlineimap with a conifguration where I clone a
>> read-only IMAP account to a GMAIL account.
>>
>> Runing the script I get multiples of the following error:
>>
>> expected a character buffer object
>> ERROR: ERROR in syncfolder for TEST folder [Gmail]/Trash: Traceback
>> (most recent call last):
>> File "/path/to/offlineimap/accounts.py", line 296, in syncfolder
>> replace(remoterepos.getsep(), localrepos.getsep()))
>> TypeError: expected a character buffer object
>
> Aye, thanks for reporting this was a true bug. We only fetched the list
> of folders lazily when needed for the first time. And this also
> initialized the folder delimiter for IMAP repositories as a
> side-effect. But in case the local IMAP repository was read-only we
> would not get the list of folders early enough and the folder delimiter
> was still "None". I pushed these three commits to the next branch which
> fix this and throw errors in case we still access the folder delimiter
> when not initialized.
>
> c93f871 Init folder list early enough
> bf4127c Remove unused imapserver getdelim()
> 20f2edf Sanity check to notify us when we call IMAPRepository.getsep()
> too early
>
>
> This is in my "next" branch now.
>
> Thanks for reporting,
> Sebastian
>>
>>
>> For me it looked like it didn't like the seperator in the GMAIL side. So
>> I added
>> sep = /
>>
>> to the configuration but that didn't change any thing.
>>
>> Any idea what's going wrong here?
>>
>> I'm running offlineimap from the current master (commit
>> e5a26dcfd8a2631f8fcbe8e0c32abed85fc7cd84) branch.
>>
>> Here my striped offlineimaprc:
>>
>> ---8<---
>> [general]
>> accounts = TEST
>> ui = TTYUI
>> maxconnections = 3
>>
>> [Account TEST]
>> localrepository = IMAP
>> remoterepository = GMAIL
>>
>> [Repository IMAP]
>> type = IMAP
>> remotehost = ...
>> remoteuser = ...
>> remotepass = ...
>> ssl = yes
>> readonly = yes
>> folderfilter = lambda foldername: foldername in ['INBOX', 'Sent']
>>
>>
>> [Repository GMAIL]
>> type = Gmail
>> remoteuser = ...
>> remotepass = ...
>> ssl = yes
>> realdelete = no
>> sep = /
>> ---8<---
>>
>> Thanks,
>> HeX
>>
>> _______________________________________________
>> OfflineIMAP-project mailing list
>> OfflineIMAP-project at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>>
>> OfflineIMAP homepage: http://software.complete.org/offlineimap
>>
>>
>> _______________________________________________
>> OfflineIMAP-project mailing list
>> OfflineIMAP-project at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/offlineimap-project
>>
>> OfflineIMAP homepage: http://software.complete.org/offlineimap
More information about the OfflineIMAP-project
mailing list