diff --git a/README.md b/README.md index 115970c..e251ed5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,12 @@ # ⛔️ DEPRECATED -This feature has been integrated into Radicale as of version 3.4.1. +RadicaleIMAP has been integrated into Radicale as of version 3.4.1. + +This fork was created to support UTF-8 in IMAP authentication, and +the commit for that was merged to Radicale 3.5.0. + +So this repo here is of use to you only if you need Radicale version +3.4.0 or less. It will conflict with Radicale 3.4.1. # Radicale IMAP diff --git a/radicale_imap/__init__.py b/radicale_imap/__init__.py index f916cbb..4f21bdf 100644 --- a/radicale_imap/__init__.py +++ b/radicale_imap/__init__.py @@ -71,7 +71,10 @@ def login(self, login, password): if security == "starttls": connection.starttls(ssl.create_default_context()) try: - connection.login(login, password) + connection.authenticate( + "PLAIN", + lambda _: "{0}\x00{0}\x00{1}".format(login, password).encode() + ) except imaplib.IMAP4.error as e: logger.debug( "IMAP authentication failed: %s", e, exc_info=True)