From 7751bdf2d16d6ad724193708749574dec86ed498 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sun, 20 Mar 2022 21:14:13 +0100 Subject: [PATCH] update mailman configuration --- .../2022.03.08/base/manual/install/install_host | 2 +- .../2022.03.08/mailman/funcs/mailman.py | 3 +-- .../mailman/manual/image/postinstall/postorius.sh | 4 ++++ .../postinstall/postorius/m_postorius/settings.py | 2 +- .../mailman/templates/postorius-settings.py | 1 + .../postfix-relay/extras/lmtp/00-lmtp.xml | 6 ++++++ .../2022.03.08/postfix-relay/templates/lmtp | 5 ++++- .../2022.03.08/postfix-relay/templates/main.cf | 14 ++------------ 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/seed/applicationservice/2022.03.08/base/manual/install/install_host b/seed/applicationservice/2022.03.08/base/manual/install/install_host index 99bf603..f63b5cd 100755 --- a/seed/applicationservice/2022.03.08/base/manual/install/install_host +++ b/seed/applicationservice/2022.03.08/base/manual/install/install_host @@ -5,7 +5,7 @@ if [ -z "$HOST_NAME" ]; then echo "usage: $0 host name" exit 1 fi -apt install --yes systemd-container dnf jq debootstrap htop +apt install --yes systemd-container dnf jq debootstrap htop gettext systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0asystemd-nspawn.conf systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0rougail.conf systemctl daemon-reload diff --git a/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py b/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py index 8e72ae1..07372bc 100644 --- a/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py +++ b/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py @@ -1,12 +1,11 @@ from risotto.utils import multi_function as _multi_function from itertools import chain - @_multi_function def mailman_emails(lists, domain): ret = [] for lst in lists: - for suffix in [None, 'bounces', 'confirm', 'join', 'leave', 'owner', 'request', 'subscribe', 'unsubscribe']: + for suffix in [None, 'bounces(\+.*)?', 'confirm(\+.*)?', 'join', 'leave', 'owner', 'request', 'subscribe', 'unsubscribe']: if suffix: lst_name = lst + '-' + suffix else: diff --git a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh index 483a88b..41d27a0 100644 --- a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh +++ b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh @@ -6,3 +6,7 @@ chmod +x "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/share/postorius/manage.py" ln -s /etc/mailman3.d/postorius.py "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/share/postorius/m_postorius/settings_local.py" ln -s ../../django_mailman3/static/django-mailman3 "$IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/static/" ln -s ../../django/contrib/admin/static/admin "$IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/static/" +#translation +msgfmt $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/locale/fr/LC_MESSAGES/django.po -o $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/locale/fr/LC_MESSAGES/django.mo +sed -i 's/$event.mlist.fqdn_listname\./$event.mlist.fqdn_listname/g' $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.po +msgfmt $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.po -o $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.mo diff --git a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py index 64dce24..ed10c03 100644 --- a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py +++ b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py @@ -172,7 +172,7 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/1.9/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'fr' TIME_ZONE = 'UTC' diff --git a/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py b/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py index 0a66a48..7cfe027 100644 --- a/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py +++ b/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py @@ -40,6 +40,7 @@ SOCIALACCOUNT_PROVIDERS = { 'ACCOUNT_USERNAME_REQUIRED': False, 'ACCOUNT_AUTHENTICATION_METHOD': 'email', 'SOCIALACCOUNT_AUTO_SIGNUP': True, + 'VERIFIED_EMAIL': True, }, } #FIXME diff --git a/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml b/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml index 9a22c22..93479ab 100644 --- a/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml +++ b/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml @@ -6,4 +6,10 @@