[Bug 1457271] [NEW] HTTP 500 error when saving changes to Message Acceptance settings

Public bug reported:
Hello,
I installed Mailman 3 and Postorius on CentOS 7, via the packages available at this repo:
https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/
I am using the default Postorius configuration. I am running Postorius using the provided development Django project from bzr. I have configured a domain that isn't real and a test list. Mailman has access to an outgoing MTA but the MTA can't send mail back via LMTP, at least at the moment.
I encountered an error when I attempted to change the test list's settings for Message Acceptance. When I try to save my change in settings, for any setting on that page, I get an error.
I was able to successfully change settings on that page (setting default_member_action to "accept", specifically) by using the Python REST client. I directly changed the value and ran .save() and everything looked correct and there were no errors.
This is the error in the Postorius log:
[20/May/2015 19:59:35] "POST /postorius/lists/testlist.mail.local/settings/message_acceptance HTTP/1.1" 500 78853
This is the output from mailman.log:
May 20 20:59:35 2015 (12584) 127.0.0.1 - - "PATCH /3.0/lists/testlist@mail.local/config HTTP/1.1" 400 2
Here is the trace output from the error:
*******
Environment:
Request Method: POST Request URL: http://127.0.0.1:8000/postorius/lists/testlist.mail.local/settings/message_a...
Django Version: 1.6.11 Python Version: 2.7.5 Installed Applications: ('django.contrib.auth', 'django.contrib.messages', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'django.contrib.staticfiles', 'postorius', 'django_browserid') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')
Traceback: File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 112. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/site-packages/postorius/auth/decorators.py" in wrapper 58. return fn(*args, **kwargs) File "/usr/lib/python2.7/site-packages/postorius/views/list.py" in list_settings 787. except HTTPError as e:
Exception Type: UnboundLocalError at /postorius/lists/testlist.mail.local/settings/message_acceptance Exception Value: local variable 'HTTPError' referenced before assignment
*********
Let me know what other information you need, or how I can help diagnose this issue.
** Affects: postorius Importance: Undecided Status: New

The reason for this is an improper handling of an empty "acceptable_aliases" response. I am working on a fix for this. In the meantime (if you don't need to actually set accepable_aliases) removing the "[]" from the "Acceptable Alias" field before submitting the form will do the trick.

** Changed in: postorius Status: New => In Progress
** Changed in: postorius Assignee: (unassigned) => Florian Fuchs (flo-fuchs)

** Changed in: postorius Assignee: Florian Fuchs (flo-fuchs) => (unassigned)
participants (2)
-
Florian Fuchs
-
Josh Farwell