summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/tasks
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2014-07-09 01:23:01 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:52:49 +0200
commit55e9b2a0ebc87a353f9c9496a77b313e41e47bd4 (patch)
tree30b5abd316a31688c494f03ee4cd2ae4fccc38f5 /roles/IMAP/tasks
parent368540caee8fff8aa90b1542897188e9f98ac585 (diff)
Perform the alias resolution and address validation solely on the MX:es.
We can therefore spare some lookups on the MDA, and use static:all instead.
Diffstat (limited to 'roles/IMAP/tasks')
-rw-r--r--roles/IMAP/tasks/mda.yml33
1 files changed, 14 insertions, 19 deletions
diff --git a/roles/IMAP/tasks/mda.yml b/roles/IMAP/tasks/mda.yml
index 698fd4f..897a61d 100644
--- a/roles/IMAP/tasks/mda.yml
+++ b/roles/IMAP/tasks/mda.yml
@@ -12,28 +12,15 @@
notify:
- Reload Postfix
-- name: Create directory /etc/postfix-.../virtual
- file: path=/etc/postfix-{{ postfix_instance[inst].name }}/virtual
- state=directory
- owner=root group=root
- mode=0755
-
-- name: Copy lookup tables
- copy: src=etc/postfix/virtual/{{ item }}
- dest=/etc/postfix-{{ postfix_instance[inst].name }}/virtual/{{ item }}
+- name: Copy the transport and recipient canonical maps
+ copy: src=etc/postfix/{{ item }}
+ dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }}
owner=root group=root
mode=0644
with_items:
- - mailbox_domains.cf
- - mailbox.cf
- - transport_content_filter.cf
-
-- name: Copy recipient canonical
- # no need to reload upon change, as cleanup(8) is short-running
- copy: src=etc/postfix/recipient_canonical.pcre
- dest=/etc/postfix-{{ postfix_instance[inst].name }}/recipient_canonical.pcre
- owner=root group=root
- mode=0644
+ # no need to reload upon change, as cleanup(8) is short-running
+ - recipient_canonical.pcre
+ - transport
- name: Build the Postfix relay clientcerts map
sudo: False
@@ -60,6 +47,14 @@
tags:
- tls_policy
+- name: Compile the Postfix transport maps
+ # trivial-rewrite(8) is a long-running process, so it's safer to reload
+ postmap: cmd=postmap src=/etc/postfix-{{ postfix_instance[inst].name }}/transport db=cdb
+ owner=root group=root
+ mode=0644
+ notify:
+ - Reload Postfix
+
- meta: flush_handlers
- name: Start Postfix