Create bogus mx list via host_vars

This commit is contained in:
phil 2023-04-19 11:33:01 +02:00
parent d786e5ab09
commit 6978dcf9b7
4 changed files with 13 additions and 11 deletions

View file

@ -12,3 +12,8 @@ postfix_pflogsum_mail_subject: "Mailserver Statistics"
tls_helper_domains_file: tls_domains
tls_helper_postfix_dir: /var/lib/postfix/tls-helper
postfix_virtual_domains_file: virtual_domains
postfix_virtual_aliases_file: virtual_aliases
postfix

View file

@ -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

View file

@ -25,7 +25,6 @@
dest: "{{ postfix_conf_dir }}/{{ item }}"
mode: "0644"
loop:
- bogus_mx
- header_checks
- header_checks_inbound
@ -36,6 +35,7 @@
mode: "0644"
loop:
- bad_smtp_auth_users
- bogus_mx
- client_checks
- destination_limit
- header_add

View 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 %}