From e9e8ce2add2b7c020daa02228e506e7c02828c15 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 17 Apr 2014 04:56:43 +0200 Subject: Decongestion potential bottlenecks on trivial_rewrite(8). Which might be caused by slow LDAP lookups in transport_maps. Instead, we alias each addresses for which we want a custom transport to a dedicated "dummy" domain, and use a static (CDB) transport_maps to map said domains to their transport; the receiver can then use canonical(8) to restore the original envelope recipient. Since the alias resolution is performed by cleanup(8), which can run in parallel with other instances, it should decongestion bottlenecks under heavy loads. So far only the MX:es have been decongestioned. The list manager and the MDA should be treated as well. --- roles/MX/templates/etc/postfix/virtual/transport.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 roles/MX/templates/etc/postfix/virtual/transport.j2 (limited to 'roles/MX/templates/etc/postfix/virtual/transport.j2') 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 %} -- cgit v1.2.3