From bc22efc8f9acb90a611cf0feb92e2a3b0eaca58d Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Mon, 29 Feb 2016 20:50:14 +0100 Subject: [PATCH] Prepare mailman configuration. --- group_vars/all | 1 + roles/mail/handlers/main.yml | 1 + roles/mail/tasks/main.yml | 1 + roles/mail/templates/postfix/main.cf.j2 | 5 +++++ roles/mail/templates/postfix/transport.j2 | 1 + 5 files changed, 9 insertions(+) create mode 100644 roles/mail/templates/postfix/transport.j2 diff --git a/group_vars/all b/group_vars/all index aeb44e3..9c14ab7 100644 --- a/group_vars/all +++ b/group_vars/all @@ -7,6 +7,7 @@ ldap_binddn: cn=Services,ou=Roles,dc=binary-kitchen,dc=de ldap_bindpw: svcpwd mail_domain: binary-kitchen.com +mailman_domain: lists.binary-kitchen.com nslcd_base_group: ou=Groups,dc=binary-kitchen,dc=de nslcd_base_shadow: ou=Users,dc=binary-kitchen,dc=de diff --git a/roles/mail/handlers/main.yml b/roles/mail/handlers/main.yml index 15e6bd6..33dde2c 100644 --- a/roles/mail/handlers/main.yml +++ b/roles/mail/handlers/main.yml @@ -19,4 +19,5 @@ - postfix/ldap-aliases.cf - postfix/ldap-virtual-maps.cf - postfix/recipient_access + - postfix/transport - postfix/virtual-alias diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 0fa4d4a..e88bdc2 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -77,6 +77,7 @@ - postfix/ldap-aliases.cf - postfix/ldap-virtual-maps.cf - postfix/recipient_access + - postfix/transport - postfix/virtual-alias notify: Run postmap tags: mail diff --git a/roles/mail/templates/postfix/main.cf.j2 b/roles/mail/templates/postfix/main.cf.j2 index ef969a1..f710505 100644 --- a/roles/mail/templates/postfix/main.cf.j2 +++ b/roles/mail/templates/postfix/main.cf.j2 @@ -81,3 +81,8 @@ virtual_alias_maps = hash:/etc/postfix/virtual-alias, ldap:/etc/postfix/ldap-ali virtual_transport = dovecot dovecot_destination_recipient_limit = 1 +# mailman +relay_domains = {{ mailman_domain }} +relay_recipient_maps = hash:/var/lib/mailman/data/virtual-mailman +transport_maps = hash:/etc/postfix/transport +mailman_destination_recipient_limit = 1 diff --git a/roles/mail/templates/postfix/transport.j2 b/roles/mail/templates/postfix/transport.j2 new file mode 100644 index 0000000..5cda071 --- /dev/null +++ b/roles/mail/templates/postfix/transport.j2 @@ -0,0 +1 @@ +{{ mailman_domain }} mailman: