Sudip Mukherjee wrote:
> I was looking into this error and this has been caused by an upstream
> commit which is supposed to be an improvement for new users. More
> details at 
> https://github.com/OfflineIMAP/offlineimap3/issues/41#issuecomment-778798223.
> 
> The attached patch should fix this.
> 
> @Joey Hess It will be great if you test the patch and confirm if it
> fixes your problem.

It does, but only after I fixed an unrelated problem:

OfflineIMAP 7.3.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.9.1+, OpenSSL 1.1.1i  8 Dec 2020
Account sync joey:
 *** Processing account joey
 Establishing connection to kitenet.net:993 (kite)
 ERROR: While attempting to sync account 'joey'
  sequence item 2: expected str instance, bytes found
 *** Finished account 'joey' in 0:03
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'joey'
  sequence item 2: expected str instance, bytes found

Traceback:
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 298, in 
syncrunner
    self.__sync()
  File "/usr/share/offlineimap3/offlineimap/accounts.py", line 374, in __sync
    remoterepos.getfolders()
  File "/usr/share/offlineimap3/offlineimap/repository/IMAP.py", line 646, in 
getfolders
    imapobj = self.imapserver.acquireconnection()
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 592, in 
acquireconnection
    self.__authn_helper(imapobj)
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 449, in 
__authn_helper
    if func(imapobj):
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 375, in 
__authn_plain
    imapobj.authenticate('PLAIN', self.__plainhandler)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 691, in authenticate
    typ, dat = self._simple_command('AUTHENTICATE', mechanism.upper())
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1684, in 
_simple_command
    return self._command_complete(self._command(name, *args), kw)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 1404, in _command
    literal = literator(data, rqb)
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 2247, in process
    ret = self.mech(self.decode(data))
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 217, in 
__plainhandler
    retval = NULL.join((authz, authc, passwd))

Which seems to be caused by remotepassfile being set, pointing at a file
that contained a password in plain text. I unset that and it prompted
for the password and worked.

(Also I remember seeing this "expected str instance" failure before,
when I was trying lots of config file changes to work around the ssl cert
problem, so one of those changes must have worked at the time. I don't 
remember what change it was.)

-- 
see shy jo

Attachment: signature.asc
Description: PGP signature

Reply via email to