diff --git a/handlers/main.yml b/handlers/main.yml index 3e936c8..a9e47b3 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -12,3 +12,6 @@ - name: Postmap blacklist shell: /usr/sbin/postmap /etc/postfix/blacklist + +- name: Postmap spam filter + shell: /usr/sbin/postmap /etc/postfix/maps/spam_filter_header_check.map diff --git a/tasks/configure.yml b/tasks/configure.yml index 679aabc..f0cb83c 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -7,6 +7,14 @@ mode: '0644' notify: Restart postfix +- name: Ensure maps folder exists + file: + state: directory + path: /etc/postfix/maps + owner: postfix + group: postfix + mode: 0644 + # - name: Template file authmysqlrc # template: # src: templates/authmysqlrc.j2 @@ -216,6 +224,14 @@ mode: 0644 notify: Postmap whitelist +- name: Ensure update spam filter map file exists + file: + state: touch + path: /etc/postfix/maps/spam_filter_header_check.map + owner: root + group: postfix + mode: 0644 + notify: Postmap spam filter - name: Create local aliases ansible.builtin.lineinfile: