aboutsummaryrefslogtreecommitdiff
path: root/roles/opendmarc
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2023-07-02 19:04:30 -0400
committerSam Chudnick <sam@chudnick.com>2023-07-02 19:04:30 -0400
commit724d877995dfcc10c462a18dcb4ea6c8b60c2d03 (patch)
tree270537b8fca585717c1ffa7708e492593f7b2ed5 /roles/opendmarc
initial commit
Diffstat (limited to 'roles/opendmarc')
-rw-r--r--roles/opendmarc/defaults/main.yml0
-rw-r--r--roles/opendmarc/files/opendmarc.conf11
-rw-r--r--roles/opendmarc/handlers/main.yml0
-rw-r--r--roles/opendmarc/tasks/main.yml39
4 files changed, 50 insertions, 0 deletions
diff --git a/roles/opendmarc/defaults/main.yml b/roles/opendmarc/defaults/main.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/roles/opendmarc/defaults/main.yml
diff --git a/roles/opendmarc/files/opendmarc.conf b/roles/opendmarc/files/opendmarc.conf
new file mode 100644
index 0000000..85a05c2
--- /dev/null
+++ b/roles/opendmarc/files/opendmarc.conf
@@ -0,0 +1,11 @@
1# OpenDMARC Configuration
2PidFile /run/opendmarc/opendmarc.pid
3PublicSuffixList /usr/share/publicsuffix/public_suffix_list.dat
4RejectFailures True
5Socket local:/var/spool/postfix/opendmarc/opendmarc.sock
6Syslog True
7SyslogFacility mail
8UMask 002
9UserID opendmarc
10SPFIgnoreResults True
11SPFSelfValidate True
diff --git a/roles/opendmarc/handlers/main.yml b/roles/opendmarc/handlers/main.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/roles/opendmarc/handlers/main.yml
diff --git a/roles/opendmarc/tasks/main.yml b/roles/opendmarc/tasks/main.yml
new file mode 100644
index 0000000..6c2fb8b
--- /dev/null
+++ b/roles/opendmarc/tasks/main.yml
@@ -0,0 +1,39 @@
1- name: install packages
2 package:
3 name:
4 - opendmarc
5 - dbconfig-no-thanks
6 state: latest
7
8- name: make directory for socket inside postfix chroot
9 file:
10 path: /var/spool/postfix/opendmarc
11 owner: opendmarc
12 group: opendmarc
13 mode: '770'
14 state: directory
15
16- name: add postfix user to opendmarc group
17 user:
18 name: postfix
19 groups: opendmarc
20 append: yes
21
22- name: deploy configuration
23 copy:
24 src: opendmarc.conf
25 dest: /etc/opendmarc.conf
26 owner: root
27 group: root
28 mode: '0644'
29
30- name: enable opendmarc
31 systemd:
32 enabled: yes
33 masked: no
34 name: opendmarc
35
36- name: restart opendmarc
37 service:
38 name: opendmarc
39 state: restarted