From dcdb8cd6b1b525fc8eacd509586da3396c068251 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 3 Dec 2018 03:18:56 +0100 Subject: Postfix: replace cdb & btree tables with lmdb ones. Cf. lmdb_table(5). --- roles/MX/tasks/main.yml | 4 ++-- roles/MX/templates/etc/postfix/main.cf.j2 | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'roles/MX') diff --git a/roles/MX/tasks/main.yml b/roles/MX/tasks/main.yml index 78362ca..6092301 100644 --- a/roles/MX/tasks/main.yml +++ b/roles/MX/tasks/main.yml @@ -4,7 +4,7 @@ - postfix - postfix-pcre - postfix-ldap - - postfix-cdb + - postfix-lmdb # The following is for reserved-alias.pl - libnet-ldap-perl - libauthen-sasl-perl @@ -73,7 +73,7 @@ - name: Compile the Postfix transport maps # trivial-rewrite(8) is a long-running process, so it's safer to reload postmap: instance={{ postfix_instance[inst].name }} - src=/etc/postfix-{{ postfix_instance[inst].name }}/virtual/transport db=cdb + src=/etc/postfix-{{ postfix_instance[inst].name }}/virtual/transport db=lmdb owner=root group=root mode=0644 notify: diff --git a/roles/MX/templates/etc/postfix/main.cf.j2 b/roles/MX/templates/etc/postfix/main.cf.j2 index e5792c4..8362d57 100644 --- a/roles/MX/templates/etc/postfix/main.cf.j2 +++ b/roles/MX/templates/etc/postfix/main.cf.j2 @@ -45,7 +45,7 @@ relay_domains = # bottlenecks on trivial_rewrite(8) due to slow LDAP lookups in # tranport_maps. virtual_transport = error:5.1.1 Virtual transport unavailable -virtual_alias_domains = !cdb:$config_directory/virtual/transport +virtual_alias_domains = !lmdb:$config_directory/virtual/transport ldap:$config_directory/virtual/domains.cf virtual_alias_maps = pcre:$config_directory/virtual/reserved_alias.pcre # unless there is a matching user/alias/list... @@ -55,7 +55,7 @@ virtual_alias_maps = pcre:$config_directory/virtual/reserved_alias.pcre # ...we resolve alias domains and catch alls ldap:$config_directory/virtual/alias_domains.cf ldap:$config_directory/virtual/catchall.cf -transport_maps = cdb:$config_directory/virtual/transport +transport_maps = lmdb:$config_directory/virtual/transport # Don't rewrite remote headers @@ -102,6 +102,7 @@ postscreen_access_list = permit_mynetworks cidr:$config_directory/access-list.cidr postscreen_dnsbl_whitelist_threshold = -1 +postscreen_cache_map = lmdb:$data_directory/postscreen_cache postscreen_blacklist_action = drop postscreen_dnsbl_threshold = 8 -- cgit v1.2.3