From 1be05a2039570c5650013e19148db251644ab8bd Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Wed, 29 May 2019 14:59:38 +0000 Subject: [PATCH] put in header checks postmap and restart --- handlers/restart_services.yml | 3 +++ roles/base/tasks/postfix.yml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/handlers/restart_services.yml b/handlers/restart_services.yml index d59dc9f783..9e9b563c9a 100644 --- a/handlers/restart_services.yml +++ b/handlers/restart_services.yml @@ -95,6 +95,9 @@ - name: rebuild postfix tls_policy command: /usr/sbin/postmap /etc/postfix/tls_policy +- name: rebuild postfix header_checks + command: /usr/sbin/postmap /etc/postfix/header_checks + - name: restart postfix service: name=postfix state=restarted diff --git a/roles/base/tasks/postfix.yml b/roles/base/tasks/postfix.yml index af8c65a827..6e8162de66 100644 --- a/roles/base/tasks/postfix.yml +++ b/roles/base/tasks/postfix.yml @@ -55,6 +55,22 @@ - base - config +- name: install /etc/postfix/header_checks file + copy: src={{ item }} dest=/etc/postfix/header_checks + with_first_found: + - "postfix/header_checks.{{ inventory_hostname }}" + - "postfix/header_checks.{{ host_group }}" + - "postfix/header_checks.{{ postfix_group }}" + - "postfix/header_checks.{{ datacenter }}" + - "postfix/header_checks" + notify: + - rebuild postfix header_checks + - restart postfix + tags: + - postfix + - config + - base + - name: create /etc/postfix/tls_policy copy: src="postfix/tls_policy" dest=/etc/postfix/tls_policy when: inventory_hostname.startswith(('bastion','smtp-mm'))