Is IMAP IDLE incompatible with preauthtunnel = ssh ?
Marc MERLIN
marc_news at merlins.org
Tue Sep 17 16:28:08 BST 2013
When I connect to my courier server over imap/ssl, IDLE works:
DEBUG[imap]: 14:16.40 Account sync merlins.org _get_untagged_response(CAPABILITY) => ['IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE AUTH=PLAIN ACL ACL2=UNION']
(...)
DEBUG[imap]: 14:17.87 Thread-4 [sync] IDLE ()
DEBUG[imap]: 14:17.87 Thread-4 state_change_pending.acquire
DEBUG[imap]: 14:17.87 Thread-4 _get_untagged_response(OK) => ['[PERMANENTFLAGS (\\* \\Draft \\Answered \\Flagged \\Deleted \\Seen)] Limited']
DEBUG[imap]: 14:17.87 Thread-4 _request_push(EMEF11, IDLE, {'cb_arg': {'callback': <function callback at 0x7f940cc6e050>}, 'callback': <bound method WrappedIMAP4_SSL._command_completer of <offlineimap.imaplibutil.WrappedIMAP4_SSL object at 0x7f940cc5f2d0>>, 'cb_self': True}) = EMEF11
DEBUG[imap]: 14:17.87 Thread-4 data=EMEF11 IDLE
DEBUG[imap]: 14:17.87 Thread-4 _request_push(continuation, None, {}) = EMEF12
DEBUG[imap]: 14:17.87 Thread-4 None:EMEF12.ready.wait
imap writer:
DEBUG[imap]: 14:17.87 imap writer > EMEF11 IDLE\r\n
imap reader:
DEBUG[imap]: 14:17.99 imap reader poll => [(5, 1)]
DEBUG[imap]: 14:17.99 imap reader rcvd 22
DEBUG[imap]: 14:17.99 imap reader < + entering idle mode\r\n
imap handler:
DEBUG[imap]: 14:17.99 imap handler _request_pop(continuation, (True, 'entering idle mode')) = EMEF12
DEBUG[imap]: 14:17.99 imap handler None:EMEF12.ready.set
Thread-4:
DEBUG[imap]: 14:17.99 Thread-4 continuation => True, entering idle mode
DEBUG[imap]: 14:17.99 Thread-4 server IDLE started, timeout in 1740.00 secs
Later (non debug mode):
*** Finished account 'merlins.org' in 0:07
Next refresh in 30.0 minutes
Thread-4:
Syncing INBOX: IMAP -> Maildir
Copy message 251511 (1 of 1) Merlins.org:INBOX -> LocalMerlins.org
But if I use
preauthtunnel = ssh -x -q imap '/usr/bin/imapd ./Maildir'
it works fine, except for IDLE:
Establishing connection to tunnel:ssh -x -q imap '/usr/bin/imapd ./Maildir'
INFO: LOGIN, user=merlin, ip=[127.0.0.1], port=[0], protocol=IMAP
Folder INBOX [acc: merlins.org]:
Syncing INBOX: IMAP -> Maildir
Account sync merlins.org:
*** Finished account 'merlins.org' in 0:03
Next refresh in 30.0 minutes
Thread-4:
WARNING: IMAP IDLE not supported on server 'ssh -x -q imap '/usr/bin/imapd ./Maildir' '.Sleep until next refresh cycle.
Debug shows:
DEBUG[imap]: keepalive: acquiring connectionlock
DEBUG[imap]: keepalive: connectionlock released
DEBUG[imap]: keepalive: processing connection 0 of 1
Thread-5:
WARNING: IMAP IDLE not supported on server 'ssh -x -q imap '/usr/bin/imapd ./Maildir' '.Sleep until next refresh cycle.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Keep alive Merlins.org:
DEBUG[imap]: keepalive: thread started
Thread-5:
DEBUG[imap]: 24:45.14 Thread-5 untagged responses dump:
FLAGS: "(\Draft \Answered \Flagged \Deleted \Seen \Recent)"
PERMANENTFLAGS: "(\Draft \Answered \Flagged \Deleted \Seen)"
RECENT: "0"
UIDVALIDITY: "1211669499"
OK: "[MYRIGHTS "acdilrsw"] ACL"
MYRIGHTS: ""acdilrsw""
READ-WRITE: ""
EXISTS: "631"
RECENT: "1"
Keep alive Merlins.org:
DEBUG[imap]: keepalive: waiting for timeout
Thread-5:
DEBUG[imap]: 24:45.14 Thread-5 [async] NOOP ()
DEBUG[imap]: 24:45.14 Thread-5 state_change_pending.acquire
DEBUG[imap]: 24:45.14 Thread-5 state_change_pending.release
DEBUG[imap]: 24:45.14 Thread-5 _get_untagged_response(OK) => ['[MYRIGHTS "acdilrsw"] ACL']
DEBUG[imap]: 24:45.14 Thread-5 _request_push(JDLN15, NOOP, {}) = JDLN15
DEBUG[imap]: 24:45.14 Thread-5 data=JDLN15 NOOP
DEBUG[imap]: 24:45.14 Thread-5 NOOP:JDLN15.ready.wait
ssh -x -q imap '/usr/bin/imapd ./Maildir' writer:
DEBUG[imap]: 24:45.14 ssh -x -q imap '/usr/bin/imapd ./Maildir' writer > JDLN15 NOOP\r\n
ssh -x -q imap '/usr/bin/imapd ./Maildir' reader:
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' reader poll => [(7, 1)]
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' reader rcvd 26
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' reader < JDLN15 OK NOOP completed\r\n
ssh -x -q imap '/usr/bin/imapd ./Maildir' handler:
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' handler state_change_free.set
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' handler _request_pop(JDLN15, ('OK', ['NOOP completed'])) = JDLN15
DEBUG[imap]: 24:45.24 ssh -x -q imap '/usr/bin/imapd ./Maildir' handler NOOP:JDLN15.ready.set
Any ideas?
Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ | PGP 1024R/763BE901
More information about the OfflineIMAP-project
mailing list