๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
ansible-playbooks/roles/postfix/templates/smtpd_helo.j2

14 lines
849 B

/^\s*localhost\s*$/ REJECT Invalid HELO hostname specified
/^\s*localhost\.localdomain\s*$/ REJECT Invalid HELO hostname specified
/^\s*127\.([0-9]{1,3}\.){2}[0-9]{1,3}\s*$/ REJECT Invalid HELO hostname specified
/^\s*10\.([0-9]{1,3}\.){2}[0-9]{1,3}\s*$/ REJECT Invalid HELO hostname specified
/^\s*192\.168.[0-9]{1,3}\.[0-9]{1,3}\s*$/ REJECT Invalid HELO hostname specified
/^\s*172\.((1[6-9]\.)|(2[0-9]\.)|(3[0-1]\.))([0-9]{1,3}\.)[0-9]{1,3}\s*$/ REJECT Invalid HELO hostname specified
{% for host in groups['nodes'] -%}
/^\s*{{ hostvars[host]['external_ipv4'] | regex_escape() }}\s*$/ REJECT Invalid HELO hostname specified
{% endfor -%}
{% for domain in mail_server.domains -%}
/(^|\.){{ domain | regex_escape() }}\s*$/ REJECT Invalid HELO hostname specified
{% endfor -%}