make extra header checks configurable
This commit is contained in:
parent
6d9f604b93
commit
41af92aea4
5 changed files with 18 additions and 11 deletions
|
|
@ -67,6 +67,11 @@ mydestination: []
|
||||||
|
|
||||||
# Check quota with dovecot at 127.0.0.1:12340
|
# Check quota with dovecot at 127.0.0.1:12340
|
||||||
check_dovecot_quota: false
|
check_dovecot_quota: false
|
||||||
|
|
||||||
|
# Header checks (only header_checks and mime_header_checks supported), see http://www.postfix.org/header_checks.5.html
|
||||||
|
# privacy related headers are removed in any case, you can add more like this:
|
||||||
|
add_header_checks:
|
||||||
|
- { regexp: "^Mime:", action: "IGNORE" }
|
||||||
```
|
```
|
||||||
|
|
||||||
**postfixmaps**
|
**postfixmaps**
|
||||||
|
|
|
||||||
|
|
@ -37,3 +37,4 @@ postfix:
|
||||||
mailboxes: mailMessageStore
|
mailboxes: mailMessageStore
|
||||||
check_dovecot_quota: false
|
check_dovecot_quota: false
|
||||||
postfixmaps: []
|
postfixmaps: []
|
||||||
|
add_header_checks: []
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
/^Received:.*with ESMTPSA/ IGNORE
|
|
||||||
/^X-Originating-IP:/ IGNORE
|
|
||||||
/^X-Mailer:/ IGNORE
|
|
||||||
/^User-Agent:/ IGNORE
|
|
||||||
|
|
@ -54,16 +54,10 @@
|
||||||
- { src: "main.cf.j2", dest: "/etc/postfix/main.cf" }
|
- { src: "main.cf.j2", dest: "/etc/postfix/main.cf" }
|
||||||
- { src: "master.cf.j2", dest: "/etc/postfix/master.cf" }
|
- { src: "master.cf.j2", dest: "/etc/postfix/master.cf" }
|
||||||
- { src: "virtual-aliases.cf.j2", dest: "/etc/postfix/virtual-aliases.cf" }
|
- { src: "virtual-aliases.cf.j2", dest: "/etc/postfix/virtual-aliases.cf" }
|
||||||
|
- { src: "header_checks.j2", dest: "/etc/postfix/header_checks" }
|
||||||
notify:
|
notify:
|
||||||
- restart postfix
|
- restart postfix
|
||||||
|
|
||||||
- name: Copy header_checks
|
|
||||||
copy:
|
|
||||||
src: header_checks
|
|
||||||
dest: /etc/postfix/header_checks
|
|
||||||
notify:
|
|
||||||
- restart postfix
|
|
||||||
|
|
||||||
- name: copy postfix maps
|
- name: copy postfix maps
|
||||||
template:
|
template:
|
||||||
src: maps.j2
|
src: maps.j2
|
||||||
|
|
|
||||||
11
templates/header_checks.j2
Normal file
11
templates/header_checks.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/^Received:.*with ESMTPSA/ IGNORE
|
||||||
|
/^X-Originating-IP:/ IGNORE
|
||||||
|
/^X-Mailer:/ IGNORE
|
||||||
|
/^User-Agent:/ IGNORE
|
||||||
|
|
||||||
|
{% if postfix.add_header_checks|length %}
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
{% for item in postfix.add_header_checks %}
|
||||||
|
/{{ item.regexp }}/ {{ item.action }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue