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_lists/meta/main.yml | 4 ++++ roles/mailman_lists/tasks/main.yml | 6 ++++++ roles/mailman_lists/templates/aliases | 13 +++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 roles/mailman_lists/meta/main.yml create mode 100644 roles/mailman_lists/tasks/main.yml create mode 100644 roles/mailman_lists/templates/aliases (limited to 'roles/mailman_lists') diff --git a/roles/mailman_lists/meta/main.yml b/roles/mailman_lists/meta/main.yml new file mode 100644 index 0000000..6eb9cb8 --- /dev/null +++ b/roles/mailman_lists/meta/main.yml @@ -0,0 +1,4 @@ +--- +dependencies: +- { role: mailman } + diff --git a/roles/mailman_lists/tasks/main.yml b/roles/mailman_lists/tasks/main.yml new file mode 100644 index 0000000..c9c1634 --- /dev/null +++ b/roles/mailman_lists/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- command: creates=/var/lib/mailman/lists/{{ item.name }} /usr/lib/mailman/bin/newlist {{ item.name }}@{{ mailman_prefix }} {{ item.owner | default( mailman_default_owner ) }} $(pwgen -1 14) + with_items: mailman_lists + +- template: src=aliases dest=/etc/postfix/aliases.mailman + notify: update mailman aliases diff --git a/roles/mailman_lists/templates/aliases b/roles/mailman_lists/templates/aliases new file mode 100644 index 0000000..7d83dd3 --- /dev/null +++ b/roles/mailman_lists/templates/aliases @@ -0,0 +1,13 @@ +{% for item in mailman_lists %} +## +{{ item.name }}: "|/usr/lib/mailman/mail/mailman post {{ item.name }}" +{{ item.name }}-admin: "|/usr/lib/mailman/mail/mailman admin {{ item.name }}" +{{ item.name }}-bounces: "|/usr/lib/mailman/mail/mailman bounces {{ item.name }}" +{{ item.name }}-confirm: "|/usr/lib/mailman/mail/mailman confirm {{ item.name }}" +{{ item.name }}-join: "|/usr/lib/mailman/mail/mailman join {{ item.name }}" +{{ item.name }}-leave: "|/usr/lib/mailman/mail/mailman leave {{ item.name }}" +{{ item.name }}-owner: "|/usr/lib/mailman/mail/mailman owner {{ item.name }}" +{{ item.name }}-request: "|/usr/lib/mailman/mail/mailman request {{ item.name }}" +{{ item.name }}-subscribe: "|/usr/lib/mailman/mail/mailman subscribe {{ item.name }}" +{{ item.name }}-unsubscribe: "|/usr/lib/mailman/mail/mailman unsubscribe {{ item.name }}" +{% endfor %} -- cgit