Problems with threading and gssapi authentication
sjh at foolishpride.org
Sun May 29 02:04:40 UTC 2011
I've recently started having problems using offlineimap to synchronize my
mail. I'm running against a zimbra server and using gssapi authentication.
When I set the max connection count to 1, things work as expected. However,
any number above 1 produces some very weird errors.
On 6.2.0, I would get strange exceptions about None Type not having a
method. On 6.3.3, I get prompted for my password a few times, and then
offlineimap seems to hang doing nothing.
I just tested v6.3.4-rc1 and I get prompted for the password a few times (my
max connections are set to 5, sometimes I get prompted 4 times, sometimes
less, but never more than 4 times). Depending on the number of times I get
prompted, I will start syncing some email. Four password prompts result in
no emai transferred. Three or less results in some email getting across.
Either way, eventually something like the following appears.
Copy message 1711582 from INBOX:
Copy message 1711582 IMAP[INBOX] -> Maildir[INBOX]
Establishing connection to mail.corp.redhat.com:993.
Thread 'Copy message 1711470 from INBOX' terminated with exception:
Traceback (most recent call last):
line 139, in run
File "/usr/lib64/python2.7/threading.py", line 483, in run
line 250, in copymessageto
message = self.getmessage(uid)
line 202, in getmessage
imapobj = self.imapserver.acquireconnection()
line 238, in acquireconnection
line 127, in plainauth
line 779, in login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
line 1492, in _simple_command
return self._command_complete(self._command(name, *args), kw)
line 1269, in _command_complete
line 1138, in _check_bye
abort: Zimbra IMAP server terminating connection
Last 6 debug messages logged for Copy message 1711470 from INBOX prior to
thread: Register new thread 'Copy message 1711470 from INBOX' (account
imap: Attempting GSSAPI authentication
imap: A required input parameter could not be read: Unknown error
imap: 13:19.40 Copy message 1711470 from INBOX last 20 log messages:
imap: GSSAPI Authentication failed
imap: Attempting plain authentication
I checked on the server side and I see that zimbra logs one good connection
from my host, followed by four connections where the authentication failed.
In each case where the authentication failed, zimbra got empty passwords.
I inserted some debugging statements into the code around the
gssapi authentication handler. From what I can tell, the first thread will
always get its connection authenticated. Then subsequent threads get some
form of the following back in imapserver.IMAPServer.acquireconnection from
the imapobj.error in the gssapi section.
AUTHENTICATE command error: BAD ['AUTHENTICATE aborted']. Data: XXXXX
I'm still digging around, but it seems to me to be a threading and state
issue with kerberos. Can anyone point me in the right direction to fixing
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OfflineIMAP-project