Trying to fix imap adapter for py3