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/files/etc/postfix/recipient_canonical.pcre | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 roles/IMAP/files/etc/postfix/recipient_canonical.pcre (limited to 'roles/IMAP/files/etc/postfix') diff --git a/roles/IMAP/files/etc/postfix/recipient_canonical.pcre b/roles/IMAP/files/etc/postfix/recipient_canonical.pcre new file mode 100644 index 0000000..07c5859 --- /dev/null +++ b/roles/IMAP/files/etc/postfix/recipient_canonical.pcre @@ -0,0 +1,4 @@ +# Restore the original envelope recipient (drop our internal domain). +# Extensions are preserved as they are included in $2. + +/^([^\/]+)\/(.+)@[^@]+$/ $2@$1 -- cgit v1.2.3