#1029847 offlineimap3: netrc support broken

#1029847#5
Date:
2023-01-28 18:45:48 UTC
From:
To:
I have an offlineimap configuration that retrieves authentication material
from .netrc.  This configuration stopped working with the most recent update
in testing.  See below for the offlineimap command output.  Note that
nothing has changed with the server and if I remove ~/.netrc and copy &
paste the values from it to the interactive offlineimap password prompt,
authentication is successful.  The problem appears specific to .netrc.

OfflineIMAP 8.0.0
  Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v3.05, Python v3.11.1, OpenSSL 3.0.7 1 Nov 2022
Account sync morgul:
 *** Processing account morgul
 Establishing connection to quickpost.morgul.net:993 (Remote)
 PLAIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.'
 LOGIN authentication failed: b'[AUTHENTICATIONFAILED] Authentication failed.'
 ERROR: All authentication types failed:
        PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
        LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
 *** Finished account 'morgul' in 0:09
ERROR: Exceptions occurred during the run!
ERROR: All authentication types failed:
        PLAIN: b'[AUTHENTICATIONFAILED] Authentication failed.'
        LOGIN: b'[AUTHENTICATIONFAILED] Authentication failed.'

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 681, in getfolders
    imapobj = self.imapserver.acquireconnection()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 593, in acquireconnection
    self.__authn_helper(imapobj)
  File "/usr/share/offlineimap3/offlineimap/imapserver.py", line 453, in __authn_helper
    raise OfflineImapError("All authentication types "