summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/mail.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:18:56 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-03 03:43:41 +0100
commitdcdb8cd6b1b525fc8eacd509586da3396c068251 (patch)
tree0ea6c49af37faf4b8b33b366506aedbf374a5968 /roles/common/tasks/mail.yml
parent78a300a2430cb2652c7839cd35400cc22122c798 (diff)
Postfix: replace cdb & btree tables with lmdb ones.
Cf. lmdb_table(5).
Diffstat (limited to 'roles/common/tasks/mail.yml')
-rw-r--r--roles/common/tasks/mail.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml
index 7692c28..49815f5 100644
--- a/roles/common/tasks/mail.yml
+++ b/roles/common/tasks/mail.yml
@@ -1,27 +1,27 @@
- name: Install Postfix
apt: pkg={{ item }}
with_items:
# That one is nicer than GNU mailutils' mailx(1)
- s-nail
- postfix
- - postfix-cdb
+ - postfix-lmdb
- name: Create Postfix instances
postmulti: instance={{ postfix_instance[item].name }}
group={{ postfix_instance[item].group | default('') }}
register: r1
with_items: "{{ postfix_instance.keys() | intersect(group_names) | list }}"
notify:
- Restart Postfix
- name: Link the dynamic maps of each children to the master's
# main.cf and master.cf are specialized to each dedicated role, though
file: src=../postfix/dynamicmaps.cf
dest=/etc/postfix-{{ postfix_instance[item].name }}/dynamicmaps.cf
owner=root group=root
state=link force=yes
register: r2
with_items: "{{ postfix_instance.keys() | intersect(group_names) | list }}"
notify:
- Restart Postfix
@@ -30,33 +30,33 @@
dest=/etc/postfix/{{ item }}
owner=root group=root
mode=0644
with_items:
- main.cf
- master.cf
notify:
- Reload Postfix
- name: Add some common aliases
lineinfile: dest=/etc/aliases create=yes
regexp='^{{ item.src }}{{':'}} '
line='{{ item.src }}{{':'}} {{ item.dst }}'
with_items:
- { src: mailer-daemon, dst: 'postmaster' }
- { src: postmaster, dst: 'root' }
- { src: nobody, dst: 'root' }
- { src: root, dst: 'root@fripost.org' }
- name: Compile the static local Postfix database
- postmap: cmd=postalias src=/etc/aliases db=cdb
+ postmap: cmd=postalias src=/etc/aliases db=lmdb
owner=root group=root
mode=0644
-# We're using CDB
+# We're using LMDB
- name: Delete /etc/aliases.db
file: path=/etc/aliases.db state=absent
- name: Start Postfix
service: name=postfix state=started
when: not (r1.changed or r2.changed)
- meta: flush_handlers