diff --git a/defaults/main.yml b/defaults/main.yml index efa1921..72e1339 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,6 +20,7 @@ postfix_use_relay_host: '{{ postfix_relay_client }}' postfix_biff: "no" postfix_append_dot_mydomain: "no" postfix_smtp_helo_required: "yes" +postfix_helo_restrictions: True postfix_smtp_delay_reject: "yes" postfix_smtp_disable_vrfy: "yes" diff --git a/templates/main.cf.j2 b/templates/main.cf.j2 index 58df795..c579bce 100644 --- a/templates/main.cf.j2 +++ b/templates/main.cf.j2 @@ -579,6 +579,14 @@ smtpd_milters = {% endif %} {% if postfix_smtpd_server %} +{% if postfix_helo_restrictions %} +smtpd_helo_restrictions = + permit_mynetworks + reject_invalid_helo_hostname + reject_non_fqdn_helo_hostname + reject_unknown_helo_hostname +{% endif %} + smtpd_recipient_restrictions = {% for recipient_rule in postfix_smtpd_server_restrictions %} {{ recipient_rule }}