Problem with imap4-utf-7 on Debian 11 and Python 3.9
psztoch opened this issue · 2 comments
psztoch commented
LookupError unknown encoding: imap4-utf-7
490: flags = flags.split(" ")
491: name = bytearray(name, "utf-8")
>>492: name = name.decode("imap4-utf-7")
493: mdm_found = False
/srv/modoboa/env/lib/python3.9/site-packages/modoboa_webmail/lib/imaputils.py
in _listmboxes, line 492
['.', '', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/srv/modoboa/env/lib/python3.9/site-packages']
Modules version:
modoboa-1.17.0.dist-info modoboa_amavis-1.3.1.dist-info modoboa_contacts-0.8.2.dist-info
modoboa_pdfcredentials-1.4.0.dist-info
modoboa_postfix_autoreply-1.6.1.dist-info
modoboa_radicale-1.5.1.dist-info
modoboa_sievefilters-1.5.0.dist-info
modoboa_webmail-1.6.1.dist-info
psztoch commented
Patch for /srv/modoboa/env/lib/python3.9/site-packages/modoboa/lib/imap_utf7.py
def imap4_utf_7(name):
- if name == "imap4-utf-7":
+ if name == "imap4-utf-7" or name == "imap4_utf_7":
return (encoder, decoder, StreamReader, StreamWriter)