imap module: fix idle for courier
@@ -269,7 +269,9 @@ class Py3status:
response = socket.read(4096).decode("ascii")
except socket_error:
raise imaplib.IMAP4.abort("Server didn't respond to 'IDLE' in time")
- if not response.lower().startswith("+ idling"):
+ # Dovecot will responde with "+ idling", courier will return "+ entering idle mode"
+ # RFC 2177 (https://tools.ietf.org/html/rfc2177) only requires the "+" character.
+ if not response.lower().startswith("+"):
raise imaplib.IMAP4.abort(
"While initializing IDLE: {}".format(response)
)
