[GH-ISSUE #1553] Server error when reviewing an email in Quarantine #1223

Closed
opened 2026-02-27 11:15:57 +03:00 by kerem · 2 comments
Owner

Originally created by @InToSSH on GitHub (Aug 10, 2018).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1553

Impacted versions

  • Modoboa: 1.10.6
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Opening some mail in Quarantine, this is not the case for all of them. Some of the emails are working just fine, but about 1/2 of them throw this error.

Current behavior

After opening an email in Quarantine, I get an internal server error.

Expected behavior

Open the email details and content.

Traceback

Environment:


Request Method: GET
Request URL: https://mail.domain.com/quarantine/getmailcontent/AwTOK2KtmylR/

Django Version: 1.11.14
Python Version: 2.7.15
Installed Applications:
(u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.sessions',
 u'django.contrib.messages',
 u'django.contrib.sites',
 u'django.contrib.staticfiles',
 u'reversion',
 u'ckeditor',
 u'ckeditor_uploader',
 u'rest_framework',
 u'rest_framework.authtoken',
 u'modoboa',
 u'modoboa.core',
 u'modoboa.lib',
 u'modoboa.admin',
 u'modoboa.transport',
 u'modoboa.relaydomains',
 u'modoboa.limits',
 u'modoboa.parameters',
 u'modoboa_amavis',
 u'modoboa_pdfcredentials',
 u'modoboa_postfix_autoreply',
 u'modoboa_sievefilters',
 u'modoboa_stats',
 u'modoboa_webmail',
 u'modoboa_contacts',
 u'modoboa_radicale',
 u'modoboa_imap_migration',
 u'modoboa_dmarc',
 'webpack_loader')
Installed Middleware:
(u'x_forwarded_for.middleware.XForwardedForMiddleware',
 u'django.contrib.sessions.middleware.SessionMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'django.contrib.auth.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware',
 u'django.middleware.locale.LocaleMiddleware',
 u'django.middleware.clickjacking.XFrameOptionsMiddleware',
 u'modoboa.core.middleware.LocalConfigMiddleware',
 u'modoboa.lib.middleware.AjaxLoginRedirect',
 u'modoboa.lib.middleware.CommonExceptionCatcher',
 u'modoboa.lib.middleware.RequestCatcherMiddleware')



Traceback:

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
  41.             response = get_response(request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  187.                 response = self.process_exception_by_middleware(e, request)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
  185.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner
  185.                     return func(*args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/lib.py" in wrapped_f
  49.                 return f(request, *args, **kwargs)

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/views.py" in getmailcontent
  146.         "mailbody": mail.body

File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/sql_email.py" in body
  59.             self._post_process_plain()

Exception Type: TypeError at /quarantine/getmailcontent/AwTOK2KtmylR/
Exception Value: _post_process_plain() takes exactly 2 arguments (1 given)

Originally created by @InToSSH on GitHub (Aug 10, 2018). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1553 # Impacted versions * Modoboa: 1.10.6 * installer used: Yes * Webserver: Nginx # Steps to reproduce Opening some mail in Quarantine, this is not the case for all of them. Some of the emails are working just fine, but about 1/2 of them throw this error. # Current behavior After opening an email in Quarantine, I get an internal server error. # Expected behavior Open the email details and content. # Traceback ``` Environment: Request Method: GET Request URL: https://mail.domain.com/quarantine/getmailcontent/AwTOK2KtmylR/ Django Version: 1.11.14 Python Version: 2.7.15 Installed Applications: (u'django.contrib.auth', u'django.contrib.contenttypes', u'django.contrib.sessions', u'django.contrib.messages', u'django.contrib.sites', u'django.contrib.staticfiles', u'reversion', u'ckeditor', u'ckeditor_uploader', u'rest_framework', u'rest_framework.authtoken', u'modoboa', u'modoboa.core', u'modoboa.lib', u'modoboa.admin', u'modoboa.transport', u'modoboa.relaydomains', u'modoboa.limits', u'modoboa.parameters', u'modoboa_amavis', u'modoboa_pdfcredentials', u'modoboa_postfix_autoreply', u'modoboa_sievefilters', u'modoboa_stats', u'modoboa_webmail', u'modoboa_contacts', u'modoboa_radicale', u'modoboa_imap_migration', u'modoboa_dmarc', 'webpack_loader') Installed Middleware: (u'x_forwarded_for.middleware.XForwardedForMiddleware', u'django.contrib.sessions.middleware.SessionMiddleware', u'django.middleware.common.CommonMiddleware', u'django.middleware.csrf.CsrfViewMiddleware', u'django.contrib.auth.middleware.AuthenticationMiddleware', u'django.contrib.messages.middleware.MessageMiddleware', u'django.middleware.locale.LocaleMiddleware', u'django.middleware.clickjacking.XFrameOptionsMiddleware', u'modoboa.core.middleware.LocalConfigMiddleware', u'modoboa.lib.middleware.AjaxLoginRedirect', u'modoboa.lib.middleware.CommonExceptionCatcher', u'modoboa.lib.middleware.RequestCatcherMiddleware') Traceback: File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner 185. return func(*args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/utils/decorators.py" in inner 185. return func(*args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/lib.py" in wrapped_f 49. return f(request, *args, **kwargs) File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/views.py" in getmailcontent 146. "mailbody": mail.body File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa_amavis/sql_email.py" in body 59. self._post_process_plain() Exception Type: TypeError at /quarantine/getmailcontent/AwTOK2KtmylR/ Exception Value: _post_process_plain() takes exactly 2 arguments (1 given) ```
kerem closed this issue 2026-02-27 11:15:57 +03:00
Author
Owner

@carbans commented on GitHub (Aug 16, 2018):

I have the same issue!

<!-- gh-comment-id:413529075 --> @carbans commented on GitHub (Aug 16, 2018): I have the same issue!
Author
Owner

@tonioo commented on GitHub (Aug 19, 2018):

See https://github.com/modoboa/modoboa-amavis/issues/114.

<!-- gh-comment-id:414110801 --> @tonioo commented on GitHub (Aug 19, 2018): See https://github.com/modoboa/modoboa-amavis/issues/114.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1223
No description provided.