Offlineimap succeeds at prompt but fails via cron job

Joseph LP ootput at gmail.com
Fri Nov 20 12:50:44 GMT 2009


Hello.

I've an issue with Offlineimap 6.2.0 on Debian Squeeze whereby the command works
perfectly fine when launched manually at command line, but fails when run on a
cron schedule. The backtrace from the cron event is:

Aborted
Thread 'Account sync ***' terminated with exception:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.5/offlineimap/threadutil.py", line 149, in \
  run Thread.run(self)
  File "/usr/lib/python2.5/threading.py", line 446, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/pymodules/python2.5/offlineimap/accounts.py", line 183, in \
  syncrunner
    self.sync(siglistener)
  File "/usr/lib/pymodules/python2.5/offlineimap/accounts.py", line 220, in sync
    remoterepos.syncfoldersto(localrepos, [statusrepos])
  File "/usr/lib/pymodules/python2.5/offlineimap/repository/Base.py", line 136,
  \ in syncfoldersto destfolders = dest.getfolders()
  File "/usr/lib/pymodules/python2.5/offlineimap/repository/IMAP.py", line 214,
  \ in getfolders imapobj = self.imapserver.acquireconnection()
  File "/usr/lib/pymodules/python2.5/offlineimap/imapserver.py", line 254, in \
  acquireconnection imapobj = UsefulIMAP4_Tunnel(self.tunnel)
  File "/usr/lib/pymodules/python2.5/offlineimap/imaplibutil.py", line 39, in \
  __init__ IMAP4.__init__(self, tunnelcmd)
  File "/usr/lib/python2.5/imaplib.py", line 184, in __init__
    self.welcome = self._get_response()
  File "/usr/lib/python2.5/imaplib.py", line 903, in _get_response
    resp = self._get_line()
  File "/usr/lib/python2.5/imaplib.py", line 998, in _get_line
    raise self.abort('socket error: EOF')
abort: socket error: EOF


Last 50 debug messages logged for Account sync *** prior to exception:
imap: dequote() called with input: INBOX.Purchases_pending
imap: imapsplit() called with input: (\HasNoChildren) "." "INBOX.School"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"."', '"INBOX.School"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "INBOX.School"
imap: dequote() returning: INBOX.School
imap: dequote() called with input: INBOX.School
imap: imapsplit() called with input: (\HasChildren) "." "INBOX.Sent Items"
imap: imapsplit() returning: ['(\\HasChildren)', '"."', '"INBOX.Sent Items"']
imap: imapsplit() called with input: \HasChildren
imap: imapsplit() returning: ['\\HasChildren']
imap: dequote() called with input: "INBOX.Sent Items"
imap: dequote() returning: INBOX.Sent Items
imap: dequote() called with input: INBOX.Sent Items
imap: imapsplit() called with input: (\HasNoChildren) "." \
      "INBOX.Sent Items.ootput"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"."', \
      '"INBOX.Sent Items.ootput"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "INBOX.Sent Items.ootput"
imap: dequote() returning: INBOX.Sent Items.ootput
imap: dequote() called with input: INBOX.Sent Items.ootput
imap: imapsplit() called with input: (\HasNoChildren) "." "INBOX.Trash"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"."', '"INBOX.Trash"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "INBOX.Trash"
imap: dequote() returning: INBOX.Trash
imap: dequote() called with input: INBOX.Trash
imap: imapsplit() called with input: (\HasNoChildren) "." "INBOX.Utilities"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"."', '"INBOX.Utilities"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "INBOX.Utilities"
imap: dequote() returning: INBOX.Utilities
imap: dequote() called with input: INBOX.Utilities
imap: imapsplit() called with input: (\HasNoChildren) "." "INBOX.Work"
imap: imapsplit() returning: ['(\\HasNoChildren)', '"."', '"INBOX.Work"']
imap: imapsplit() called with input: \HasNoChildren
imap: imapsplit() returning: ['\\HasNoChildren']
imap: dequote() called with input: "INBOX.Work"
imap: dequote() returning: INBOX.Work
imap: dequote() called with input: INBOX.Work


My email configuration is: remote_imap<->offlineimap<->local_dovecot_imap, and I
peruse mail folders with mutt, with my .offlineimaprc being:

[general]
accounts = ***
ui = Noninteractive.Basic

[Account ***]
localrepository = mylocal
remoterepository = myremote

[Repository mylocal]
type = IMAP
preauthtunnel = /usr/sbin/dovecot --exec-mail imap
remotehost = localhost
port = 143
remoteuser = ootput

[Repository myremote]
type = IMAP
remotehost = ***
ssl = yes
remoteuser = ***@***

Now to be honest, I'm not entirely sure this is an Offlineimap issue, as manual
operation works flawlessly. It is only when Offlineimap is introduced via a cron
entry:

0 * * * * /usr/bin/offlineimap &>/dev/null

.. does it falter.

I will address Debian mailing list if this turns out to be unrelated to
upstream.

Regards,
Joe






More information about the OfflineIMAP-project mailing list