Error while fetching emails
tonioo opened this issue · 0 comments
tonioo commented
UnicodeDecodeError at /webmail/
'charmap' codec can't decode byte 0xc1 in position 6: character maps to <undefined>
Request Method: GET
Request URL: https://mail.example.com/webmail/?action=listmailbox&mbox=INBOX&scroll=true&page=2
Django Version: 2.2.17
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.6.9
Python Path: ['.', '', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/srv/modoboa/env/lib/python3.6/site-packages']
Server time: Wed, 20 Jan 2021 14:51:04 +0200
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.sites',
'django.contrib.staticfiles',
'reversion',
'ckeditor',
'ckeditor_uploader',
'rest_framework',
'rest_framework.authtoken',
'django_otp',
'django_otp.plugins.otp_totp',
'django_otp.plugins.otp_static',
'modoboa',
'modoboa.core',
'modoboa.lib',
'modoboa.admin',
'modoboa.transport',
'modoboa.relaydomains',
'modoboa.limits',
'modoboa.parameters',
'modoboa.dnstools',
'modoboa.policyd',
'modoboa.maillog',
'modoboa_amavis',
'modoboa_pdfcredentials',
'modoboa_postfix_autoreply',
'modoboa_sievefilters',
'modoboa_webmail',
'modoboa_contacts',
'webpack_loader')
Installed Middleware:
('x_forwarded_for.middleware.XForwardedForMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django_otp.middleware.OTPMiddleware',
'modoboa.core.middleware.TwoFAMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'modoboa.core.middleware.LocalConfigMiddleware',
'modoboa.lib.middleware.AjaxLoginRedirect',
'modoboa.lib.middleware.CommonExceptionCatcher',
'modoboa.lib.middleware.RequestCatcherMiddleware')
Traceback:
File "/srv/modoboa/env/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
34. response = get_response(request)
File "/srv/modoboa/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "/srv/modoboa/env/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3.6/contextlib.py" in inner
52. return func(*args, **kwds)
File "/usr/lib/python3.6/contextlib.py" in inner
52. return func(*args, **kwds)
File "/srv/modoboa/env/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
21. return view_func(request, *args, **kwargs)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa/admin/lib.py" in wrapped_f
37. return f(request, *args, **kwargs)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/views.py" in index
652. response = globals()[action](request)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/views.py" in listmailbox
401. email_list = mbc.fetch(page.id_start, page.id_stop, mbox)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/imaputils.py" in fetch
748. data = self._cmd("FETCH", mrange, query)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/imaputils.py" in _cmd
217. return FetchResponseParser().parse(data)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/fetch_parser.py" in parse
280. self.parse_chunk(schunk)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/fetch_parser.py" in parse_chunk
242. chunk = self.__convert_to_str(chunk)
File "/srv/modoboa/env/lib/python3.6/site-packages/modoboa_webmail/lib/fetch_parser.py" in __convert_to_str
236. return chunk.decode(result["encoding"])
File "/usr/lib/python3.6/encodings/iso8859_8.py" in decode
15. return codecs.charmap_decode(input,errors,decoding_table)
Exception Type: UnicodeDecodeError at /webmail/
Exception Value: 'charmap' codec can't decode byte 0xc1 in position 6: character maps to <undefined>