diff --git a/tasks/postfix.yml b/tasks/postfix.yml index caa2097..0b9b4c1 100644 --- a/tasks/postfix.yml +++ b/tasks/postfix.yml @@ -27,7 +27,6 @@ dest: "{{ postfix_conf_dir }}/{{ item }}" mode: "0644" loop: - - header_checks - header_checks_inbound - name: "Postfix | Copy lookup tables from templates" @@ -42,6 +41,7 @@ - name: client_checks - name: destination_limit - name: header_add + - name: header_checks - name: header_treatment - name: helo_checks - name: permit_sasl_login_mismatch diff --git a/files/postfix/conf.d/header_checks b/templates/postfix/conf.d/header_checks.j2 similarity index 70% rename from files/postfix/conf.d/header_checks rename to templates/postfix/conf.d/header_checks.j2 index 771ccc6..e3c1ca3 100644 --- a/files/postfix/conf.d/header_checks +++ b/templates/postfix/conf.d/header_checks.j2 @@ -8,3 +8,9 @@ ops|pcd|pif|prf|reg|sc[frt]|sh[bsm]|swf| vb[esx]?|vxd|ws[cfh]))(\?=)?"?\s*(;|$)/x REJECT Attachment name "$2" may not end with ".$4" + +{% if postfix_header_checks is defined %} +{% for header in postfix_header_checks %} +{{ "%-50s %s" | format(header.header, header.action) }} +{% endfor %} +{% endif %}