aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-07-29 20:17:44 +0100
committerGravatar Joe Banks <[email protected]>2024-07-31 13:25:54 +0100
commit7f317575d1c12c03adb8eff0942cb06b74c3c272 (patch)
treede05e476af51fe637804b6a61562106056016bb1
parentpostfix: add new aliases to relay restrictions and alias maps (diff)
ldap: handle group-directed email
-rw-r--r--ansible/roles/postfix/tasks/main.yml2
-rw-r--r--ansible/roles/postfix/templates/ldap/ldap-group-aliases.cf.j211
2 files changed, 13 insertions, 0 deletions
diff --git a/ansible/roles/postfix/tasks/main.yml b/ansible/roles/postfix/tasks/main.yml
index 1c00777..fdf4612 100644
--- a/ansible/roles/postfix/tasks/main.yml
+++ b/ansible/roles/postfix/tasks/main.yml
@@ -48,6 +48,8 @@
filename: ldap-uid.cf
- template: ldap/ldap-relay-recipients.cf.j2
filename: ldap-relay-recipients.cf
+ - template: ldap/ldap-group-aliases.cf.j2
+ filename: ldap-group-aliases.cf
tags:
- role::postfix
notify:
diff --git a/ansible/roles/postfix/templates/ldap/ldap-group-aliases.cf.j2 b/ansible/roles/postfix/templates/ldap/ldap-group-aliases.cf.j2
new file mode 100644
index 0000000..9965e0d
--- /dev/null
+++ b/ansible/roles/postfix/templates/ldap/ldap-group-aliases.cf.j2
@@ -0,0 +1,11 @@
+# Ansible Managed
+
+server_host = {{ postfix_bind_server }}
+bind = yes
+bind_dn = {{ postfix_bind_user }}
+bind_pw = {{ postfix_bind_password }}
+search_base = cn=groups,cn=accounts,dc=box,dc=pydis,dc=wtf
+query_filter = (cn=%u)
+special_result_attribute = member
+result_attribute = mail
+version = 3