non-blocking imap function for gevent