summaryrefslogtreecommitdiffstats
path: root/roles/MX/templates/etc/postfix/virtual
diff options
context:
space:
mode:
Diffstat (limited to 'roles/MX/templates/etc/postfix/virtual')
-rw-r--r--roles/MX/templates/etc/postfix/virtual/list.cf.j24
-rw-r--r--roles/MX/templates/etc/postfix/virtual/mailbox.cf.j24
-rw-r--r--roles/MX/templates/etc/postfix/virtual/transport.j213
-rw-r--r--roles/MX/templates/etc/postfix/virtual/transport_list.cf.j213
-rw-r--r--roles/MX/templates/etc/postfix/virtual/transport_reserved_alias.j21
5 files changed, 19 insertions, 16 deletions
diff --git a/roles/MX/templates/etc/postfix/virtual/list.cf.j2 b/roles/MX/templates/etc/postfix/virtual/list.cf.j2
index 8bcd5df..6100c01 100644
--- a/roles/MX/templates/etc/postfix/virtual/list.cf.j2
+++ b/roles/MX/templates/etc/postfix/virtual/list.cf.j2
@@ -6,4 +6,6 @@ scope = base
bind = none
query_filter = (&(objectClass=FripostVirtualList)(fvl=%u))
result_attribute = fvl
-result_format = %S
+# Use a dedicated "virtual" domain to decongestion potential bottlenecks
+# on trivial_rewrite(8) due to slow LDAP lookups in tranport_maps.
+result_format = %D/%U@lists.guilhem.org
diff --git a/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 b/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2
index b421e9a..fe27124 100644
--- a/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2
+++ b/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2
@@ -6,4 +6,6 @@ scope = base
bind = none
query_filter = (&(objectClass=FripostVirtualUser)(fvl=%u))
result_attribute = fvl
-result_format = %S
+# Use a dedicated "virtual" domain to decongestion potential bottlenecks
+# on trivial_rewrite(8) due to slow LDAP lookups in tranport_maps.
+result_format = %D/%U@mda.guilhem.org
diff --git a/roles/MX/templates/etc/postfix/virtual/transport.j2 b/roles/MX/templates/etc/postfix/virtual/transport.j2
new file mode 100644
index 0000000..6d244dc
--- /dev/null
+++ b/roles/MX/templates/etc/postfix/virtual/transport.j2
@@ -0,0 +1,13 @@
+reserved.locahost.localdomain reserved-alias:
+
+{% if 'LDA' in group_names %}
+mda.guilhem.org smtpl:[127.0.0.1]:{{ LDA.port }}
+{% else %}
+mda.guilhem.org smtps:[{{ LDA.host }}]:{{ LDA.port }}
+{% endif %}
+
+{% if 'lists' in group_names %}
+lists.guilhem.org smtpl:[127.0.0.1]:{{ lists.port }}
+{% else %}
+lists.guilhem.org smtps:[{{ lists.host }}]:{{ lists.port }}
+{% endif %}
diff --git a/roles/MX/templates/etc/postfix/virtual/transport_list.cf.j2 b/roles/MX/templates/etc/postfix/virtual/transport_list.cf.j2
deleted file mode 100644
index eb696db..0000000
--- a/roles/MX/templates/etc/postfix/virtual/transport_list.cf.j2
+++ /dev/null
@@ -1,13 +0,0 @@
-server_host = ldapi://%2Fprivate%2Fldapi/
-version = 3
-search_base = fvl=%u,fvd=%d,ou=virtual,o=mailHosting,dc=fripost,dc=org
-domain = static:all
-scope = base
-bind = none
-query_filter = (&(objectClass=FripostVirtualList)(fvl=%u))
-result_attribute = fvl
-{% if 'lists' in group_names %}
-result_format = smtpl:[127.0.0.1]:{{ lists.port }}
-{% else %}
-result_format = smtps:[{{ lists.host }}]:{{ lists.port }}
-{% endif %}
diff --git a/roles/MX/templates/etc/postfix/virtual/transport_reserved_alias.j2 b/roles/MX/templates/etc/postfix/virtual/transport_reserved_alias.j2
deleted file mode 100644
index 4af5318..0000000
--- a/roles/MX/templates/etc/postfix/virtual/transport_reserved_alias.j2
+++ /dev/null
@@ -1 +0,0 @@
-reserved.locahost.localdomain reserved-alias: