Having a really hard time keeping Offlineimap running

John Wiegley jwiegley at gmail.com
Wed Aug 31 15:56:42 UTC 2011


I haven't yet been able to get Offlineimap stable enough so that it keeps
running through a full day.  I'm even starting it with launchctl, so that if
it dies, OS X will simply start a new one.  But it doesn't just die -- it
stops working, so launchctl can't help.

Here's what I see in the logs from last night, about an hour after I went to
bed:

--8<---------------cut here---------------start------------->8---
Exception in thread Thread-622:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/imapserver.py", line 509, in idle
    imapobj.select(self.folder)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/imaplibutil.py", line 52, in select
    result = self.__class__.__bases__[1].select(self, mailbox, readonly)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/imaplib2.py", line 986, in select
    typ, dat = rqb.get_response('command: %s => %%s' % rqb.name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/offlineimap/imaplib2.py", line 173, in get_response
    raise typ(exc_fmt % str(val))
abort: command: SELECT => connection terminated
***** Finished processing account Gmail
Copying folder structure from IMAP to MappedIMAP
--8<---------------cut here---------------end--------------->8---

Is there any way to make Offlineimap more resilient to failure, so it simply
starts over if something goes bad?  After the trace above, the process became
non-functional and I had to kill it before Offlineimap would do anything
again.

My config file is below.

Thanks,
  John

[general]
accounts = Gmail
ui = basic
fsync = False
maxsyncaccounts = 1
socktimeout = 60

[Account Gmail]
localrepository = LocalIMAP
remoterepository = RemoteIMAP
autorefresh = 15
#quick = 3
postsynchook = imap-postsync

[Repository LocalIMAP]
type = IMAP
remotehost = localhost
remoteuser = XXXX
remotepass = XXXX
preauthtunnel = MAIL=maildir:$HOME/Library/Mail/Maildir /opt/local/libexec/dovecot/imap

[Repository LocalMaildir]
type = Maildir
localfolders = ~/Library/Mail/Maildir
sep = .
restoreatime = no

[Repository RemoteIMAP]
type = IMAP
remotehost = imap.gmail.com
remoteuser = XXXX
remotepass = XXXX
ssl = yes
maxconnections = 3
holdconnectionopen = yes
keepalive = 30
idlefolders = [ 'INBOX', '[Gmail]/All Mail' ]
realdelete = yes
folderfilter = lambda name: name not in [ '[Gmail]/Spam', 'Lists/Bahai/Mystical Writings', 'Lists/Bahai/Mystics' ]

# The following is only use if syncing directly to a Maildir
#nametrans = lambda name: '.' if name == 'INBOX' else '.' + name




More information about the OfflineIMAP-project mailing list