Create bogus mx list via host_vars
This commit is contained in:
parent
d786e5ab09
commit
6978dcf9b7
4 changed files with 13 additions and 11 deletions
|
@ -12,3 +12,8 @@ postfix_pflogsum_mail_subject: "Mailserver Statistics"
|
||||||
|
|
||||||
tls_helper_domains_file: tls_domains
|
tls_helper_domains_file: tls_domains
|
||||||
tls_helper_postfix_dir: /var/lib/postfix/tls-helper
|
tls_helper_postfix_dir: /var/lib/postfix/tls-helper
|
||||||
|
|
||||||
|
postfix_virtual_domains_file: virtual_domains
|
||||||
|
postfix_virtual_aliases_file: virtual_aliases
|
||||||
|
|
||||||
|
postfix
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# Managed by Ansible
|
|
||||||
|
|
||||||
# bogus networks
|
|
||||||
0.0.0.0/8 550 Mail server in broadcast network
|
|
||||||
1.0.0.0/8 550 Mail server in IANA reserved network
|
|
||||||
#10.0.0.0/8 550 No route to your RFC 1918 network
|
|
||||||
127.0.0.0/8 550 Mail server in loopback network
|
|
||||||
224.0.0.0/4 550 Mail server in class D multicast network
|
|
||||||
#172.16.0.0/12 550 No route to your RFC 1918 network
|
|
||||||
192.168.0.0/16 550 No route to your RFC 1918 network
|
|
|
@ -25,7 +25,6 @@
|
||||||
dest: "{{ postfix_conf_dir }}/{{ item }}"
|
dest: "{{ postfix_conf_dir }}/{{ item }}"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop:
|
loop:
|
||||||
- bogus_mx
|
|
||||||
- header_checks
|
- header_checks
|
||||||
- header_checks_inbound
|
- header_checks_inbound
|
||||||
|
|
||||||
|
@ -36,6 +35,7 @@
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop:
|
loop:
|
||||||
- bad_smtp_auth_users
|
- bad_smtp_auth_users
|
||||||
|
- bogus_mx
|
||||||
- client_checks
|
- client_checks
|
||||||
- destination_limit
|
- destination_limit
|
||||||
- header_add
|
- header_add
|
||||||
|
|
7
templates/postfix/conf.d/bogus_mx.j2
Normal file
7
templates/postfix/conf.d/bogus_mx.j2
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
### {{ managed_by_ansible }}
|
||||||
|
|
||||||
|
{% if postfix_bogus_mx is defined %}
|
||||||
|
{% for mx in postfix_bogus_mx %}
|
||||||
|
{{ "%-30s %s" | format(mx.src, mx.msg) }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
Loading…
Reference in a new issue