command LIST illegal in state NONAUTH, only allowed in states AUTH, SELECTED
Marc MERLIN
marc_news at merlins.org
Mon Jan 20 14:29:51 GMT 2020
On Sun, Jan 19, 2020 at 01:54:17AM +0100, Nicolas Sebrecht wrote:
> > I have offlineimap configured like this:
> > preauthtunnel = ssh -p443 -x -q imap.merlins.org 'sleep 1; IMAP_IDLE_TIMEOUT=20 IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=REFERENCES SORT QUOTA IDLE" /usr/bin/imapd ./Maildir'
> >
> > Any idea where I should go from here besides restarting offlineimap
> > multiple times until it works?
>
> It looks like offlineimap releases IMAP commands while in the incorrect
> IMAP state. However, it's hard to say if this comes from offlineimap or
> the server. I'm not aware of other users having this issue with
> offlineimap. OTOH I would not be surprised if that's the offlineimap
> fault.
>
> I think this issue could come from IDLE or something which logout the
> client while the client still thinks it is authenticated.
>
> I would first try without IDLE or by increasing the IMAP_IDLE_TIMEOUT a
> lot to check this.
Thanks for the suggestions. I just tried, but it didn't help:
saruman:~$ offlineimap -d imap -a merlins.org
OfflineIMAP 7.2.3
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (system), Python v2.7.15+, OpenSSL 1.1.1a 20 Nov 2018
Debug mode: Forcing to singlethreaded.
Now debugging for imap: IMAP protocol debugging
Now debugging for : Other offlineimap related sync messages
Account sync merlins.org:
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
*** Processing account merlins.org
Establishing connection to tunnel:ssh -p443 -x -q imap.merlins.org 'sleep 1; IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=REFERENCES SORT" /usr/bin/imapd ./Maildir' (Merlins.org)
INFO: LOGIN, user=merlin, ip=[127.0.0.1], port=[0], protocol=IMAP
ERROR: While attempting to sync account 'merlins.org'
command LIST illegal in state NONAUTH, only allowed in states AUTH, SELECTED
[' File "/usr/share/offlineimap/offlineimap/accounts.py", line 283, in syncrunner\n self.__sync()\n', ' File "/usr/share/offlineimap/offlineimap/accounts.py", line 359, in __sync\n remoterepos.getfolders()\n', ' File "/usr/share/offlineimap/offlineimap/repository/IMAP.py", line 452, in getfolders\n imapobj = self.imapserver.acquireconnection()\n', ' File "/usr/share/offlineimap/offlineimap/imapserver.py", line 603, in acquireconnection\n listres = imapobj.list(self.reference, \'""\')[1]\n', ' File "/usr/lib/python2.7/dist-packages/imaplib2.py", line 947, in list\n return self._simple_command(name, directory, pattern, **kw)\n', ' File "/usr/lib/python2.7/dist-packages/imaplib2.py", line 1748, in _simple_command\n return self._command_complete(self._command(name, *args), kw)\n', ' File "/usr/lib/python2.7/dist-packages/imaplib2.py", line 1408, in _command\n % (name, self.state, \', \'.join(Commands[name][CMD_VAL_STATES])))\n']
*** Finished account 'merlins.org' in 0:01
Keep alive Merlins.org:
[imap]: keepalive thread started
Account sync merlins.org:
Next refresh in 30.0 minutes
Keep alive Merlins.org:
[imap]: keepalive: waiting for timeout
^CAccount sync merlins.org:
Preparing to shutdown after sync (this may take some time), press CTRL-C three times to shutdown immediately
ssh -p443 -x -q imap.merlins.org 'sleep 1; IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=REFERENCES SORT" /usr/bin/imapd ./Maildir' reader:
[imap]: 14:40.92 ssh -p443 -x -q imap.merlins.org 'sleep 1; IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=REFERENCES SORT" /usr/bin/imapd ./Maildir' reader last 20 log messages:
Account sync merlins.org:
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'merlins.org'
command LIST illegal in state NONAUTH, only allowed in states AUTH, SELECTED
Looks like removing IDLE didn't help
Re-running the same command works after once or twice.
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Home page: http://marc.merlins.org/ | PGP 7F55D5F27AAF9D08
More information about the OfflineIMAP-project
mailing list