diff options
author | Michael Scherer <misc@zarb.org> | 2014-12-12 14:28:47 +0100 |
---|---|---|
committer | Michael Scherer <misc@zarb.org> | 2014-12-12 14:28:47 +0100 |
commit | ca315bf9c292d4757b67a86117e3182c1b0dd680 (patch) | |
tree | 57923818c4e974b2d7f8e16be14ef3d8612b855f /roles/mailman_lists | |
parent | d9e874ece0c162fcba01553fbea0a8b2fd86d249 (diff) |
Import postfix/mailman from rad
Diffstat (limited to 'roles/mailman_lists')
-rw-r--r-- | roles/mailman_lists/meta/main.yml | 4 | ||||
-rw-r--r-- | roles/mailman_lists/tasks/main.yml | 6 | ||||
-rw-r--r-- | roles/mailman_lists/templates/aliases | 13 |
3 files changed, 23 insertions, 0 deletions
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 %} |