From 40f480d1aaca8c17c506f97525ad953aace5060e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Thu, 7 Nov 2013 13:48:37 +0000 Subject: [PATCH] mailman: a few fixes --- roles/mailman/files/import-mm2.py | 4 +++- roles/mailman/templates/settings.py.j2 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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