diff --git a/roles/mailman/files/import-mm2.py b/roles/mailman/files/import-mm2.py index 13467433f7..bdcb4a2b16 100755 --- a/roles/mailman/files/import-mm2.py +++ b/roles/mailman/files/import-mm2.py @@ -5,6 +5,7 @@ import sys import subprocess import pickle from optparse import OptionParser +import yaml def call(command): @@ -66,7 +67,8 @@ class Importer(object): self.config["confdir"], "-s", "settings_admin", "-l", listaddr, "--continue", archivefile]) if self.index_path: - call(["sudo", "chown", "mailman:", "-R", self.index_path]) + call(["sudo", "chown", "mailman:apache", "-R", self.index_path]) + call(["sudo", "chmod", "g+w", self.index_path]) diff --git a/roles/mailman/templates/settings.py.j2 b/roles/mailman/templates/settings.py.j2 index 7ac1f9620d..3721607d5b 100644 --- a/roles/mailman/templates/settings.py.j2 +++ b/roles/mailman/templates/settings.py.j2 @@ -37,7 +37,7 @@ DATABASES = { # Hosts/domain names that are valid for this site; required if DEBUG is False # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts -ALLOWED_HOSTS = [".fedoraproject.org"] +ALLOWED_HOSTS = [".fedoraproject.org", "127.0.0.1"] # 127.0.0.1: HAProxy ping # We're behind a proxy, use the X-Forwarded-Host header # See https://docs.djangoproject.com/en/1.5/ref/settings/#use-x-forwarded-host