summaryrefslogtreecommitdiffstats
path: root/roles/amavis/tasks/main.yml
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2016-09-18 17:55:33 +0200
committerGuilhem Moulin <guilhem@fripost.org>2016-09-18 17:55:33 +0200
commita4ecc629b38e9d9d4cf918d6095112347c141e55 (patch)
tree654def79ff5bab9a947887ee2ce2942ac3082d7d /roles/amavis/tasks/main.yml
parent87dc808939fbc740c3742e10ce4d23a4c7099c07 (diff)
Postfix: ensure common aliases are present.
Diffstat (limited to 'roles/amavis/tasks/main.yml')
-rw-r--r--roles/amavis/tasks/main.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/amavis/tasks/main.yml b/roles/amavis/tasks/main.yml
index c061d09..d4298b8 100644
--- a/roles/amavis/tasks/main.yml
+++ b/roles/amavis/tasks/main.yml
@@ -13,40 +13,50 @@
- pax
- binutils
- p7zip-full
- unrar-free
- arj
- nomarch
- zoo
- ripole
- cabextract
- unar
- tnef
notify:
- Restart Amavis
- name: Add 'clamav' to the group 'amavis'
user: name=clamav groups=amavis append=yes
notify:
- Restart ClamAV
- Restart Amavis
+- name: Add an 'amavis' alias
+ lineinfile: dest=/etc/aliases create=yes
+ regexp="^amavis{{':'}} "
+ line="amavis{{':'}} root"
+
+- name: Compile the static local Postfix database
+ postmap: cmd=postalias src=/etc/aliases db=cdb
+ owner=root group=root
+ mode=0644
+
- name: Create directory /var/lib/dkim
file: path=/var/lib/dkim
state=directory
owner=root group=root
mode=0755
when: "'out' in group_names"
tags:
- genkey
- name: Generate a private key for DKIM signing
command: genkeypair.sh dkim --privkey=/var/lib/dkim/20140703.fripost.org.key -t rsa -b 1024
register: dkim
changed_when: dkim.rc == 0
failed_when: dkim.rc > 1
when: "'out' in group_names"
notify:
- Restart Amavis
- Publish the public key to the DNS zone
tags:
- genkey