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/IMAP/templates/etc/postfix/main.cf.j2 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'roles/IMAP/templates/etc/postfix') diff --git a/roles/IMAP/templates/etc/postfix/main.cf.j2 b/roles/IMAP/templates/etc/postfix/main.cf.j2 index e4c01bd..d0421ce 100644 --- a/roles/IMAP/templates/etc/postfix/main.cf.j2 +++ b/roles/IMAP/templates/etc/postfix/main.cf.j2 @@ -55,6 +55,11 @@ virtual_mailbox_domains = ldap:$config_directory/virtual/mailbox_domains.cf virtual_mailbox_maps = ldap:$config_directory/virtual/mailbox.cf transport_maps = ldap:$config_directory/virtual/transport_content_filter.cf +# Restore the original envelope recipient +relay_domains = $myhostname +recipient_canonical_classes = envelope_recipient +recipient_canonical_maps = pcre:$config_directory/recipient_canonical.pcre + # Don't rewrite remote headers local_header_rewrite_clients = # Tolerate occasional high latency -- cgit v1.2.3