Bug 796754

Summary: Offlineimap bails out on sync if remote folder are not writable
Product: [Fedora] Fedora Reporter: David Kovalsky <dkovalsk>
Component: offlineimapAssignee: Christoph Höger <choeger>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 16CC: benl, choeger, jeder, lzap
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-01 10:15:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Kovalsky 2012-02-23 15:36:35 UTC
I've noticed that offlineimap complains about sync even for folders that I never write into. My expectations is to do one way sync of readonly folders from the remote to local, which I believe should be a valid scenario. 

The remote server is Zimbra:

ERROR: Aborting sync, folder 'Emailed Contacts' [acc: 'RedHatImap']
  Server 'mail.corp.redhat.com' closed connection, error on SELECT 'Emailed Contacts'. Server said: Emailed Contacts is not writable
ERROR: Aborting sync, folder 'Contacts' [acc: 'RedHatImap']
  Server 'mail.corp.redhat.com' closed connection, error on SELECT 'Contacts'. Server said: Contacts is not writable


Is it possible to mark some folders as read-only (in the config file) or even better - for offlineimap to figure this out and handle gracefully? 


offlineimap-6.5.2.1-1.fc16.noarch

Comment 1 Christoph Höger 2012-03-01 10:15:35 UTC
You can use the folderfilter command in your .offlineimaprc to choose which folders to sync. 

Regarding the read-only issue: How should offlineimap sync a folder that it cannot even SELECT ? It seems to me that your imap server's write protection is somewhat too radical here. So I am closing this as NOTABUG. Feel free to reopen if you see a way of how offlineimap could handle those mailboxes.

Comment 2 David Kovalsky 2012-03-06 14:04:10 UTC
Thanks for the response Christoph.

I do see messages in the folders, so I was under the impression that this has worked in the past and something changed wrt how offlineimap reads those folders. On the other hand, changes could have been done on the remote side. And given I don't care for the folder contents, I don't mind this getting closed :)

Thanks for all the work you're doing on offlineimap!

Comment 3 Lukas Zapletal 2012-04-05 14:58:11 UTC
For future googlers trying to realize how to ignore those two "bad" Zimbra folders in Fedora 17+ I am attaching David's solution (thanks!):

folderfilter = lambda foldername: foldername not in ['Contacts', Emailed Contacts' ]

Comment 4 Jeremy Eder 2012-12-24 01:19:10 UTC
Mostly putting this here for my future googler self:

folderfilter = lambda folder: folder not in ['Contacts', 'Emailed Contacts']