From ca315bf9c292d4757b67a86117e3182c1b0dd680 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Fri, 12 Dec 2014 14:28:47 +0100 Subject: Import postfix/mailman from rad --- roles/mailman/templates/aliases | 12 ++++++++++++ roles/mailman/templates/mm_cfg.py | 12 ++++++++++++ roles/mailman/templates/vhost.conf | 14 ++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 roles/mailman/templates/aliases create mode 100644 roles/mailman/templates/mm_cfg.py create mode 100644 roles/mailman/templates/vhost.conf (limited to 'roles/mailman/templates') diff --git a/roles/mailman/templates/aliases b/roles/mailman/templates/aliases new file mode 100644 index 0000000..9fbf58f --- /dev/null +++ b/roles/mailman/templates/aliases @@ -0,0 +1,12 @@ +## default list +mailman: "|/usr/lib/mailman/mail/mailman post mailman" +mailman-admin: "|/usr/lib/mailman/mail/mailman admin mailman" +mailman-bounces: "|/usr/lib/mailman/mail/mailman bounces mailman" +mailman-confirm: "|/usr/lib/mailman/mail/mailman confirm mailman" +mailman-join: "|/usr/lib/mailman/mail/mailman join mailman" +mailman-leave: "|/usr/lib/mailman/mail/mailman leave mailman" +mailman-owner: "|/usr/lib/mailman/mail/mailman owner mailman" +mailman-request: "|/usr/lib/mailman/mail/mailman request mailman" +mailman-subscribe: "|/usr/lib/mailman/mail/mailman subscribe mailman" +mailman-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe mailman" + diff --git a/roles/mailman/templates/mm_cfg.py b/roles/mailman/templates/mm_cfg.py new file mode 100644 index 0000000..539234a --- /dev/null +++ b/roles/mailman/templates/mm_cfg.py @@ -0,0 +1,12 @@ +# -*- python -*- + +from Defaults import * +import pwd, grp + +MAILMAN_UID = pwd.getpwnam('mailman')[2] +MAILMAN_GID = grp.getgrnam('mailman')[2] + +DEFAULT_URL_HOST = "{{ mailman_webinterface }}" +DEFAULT_EMAIL_HOST = "{{ mailman_prefix }}" + +add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST) diff --git a/roles/mailman/templates/vhost.conf b/roles/mailman/templates/vhost.conf new file mode 100644 index 0000000..bd2f01e --- /dev/null +++ b/roles/mailman/templates/vhost.conf @@ -0,0 +1,14 @@ +{% for i in '80', '443' %} + + + + DirectoryIndex listinfo + + + RedirectMatch ^/$ /mailman/ + + RedirectMatch ^/mailman[/]*$ /mailman/listinfo + ServerName {{ website_url | default( ansible_hostname ) }} + + +{% endfor %} -- cgit