From 7f7743b6839a740dc84652ae9ce43e8f0897eba7 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 8 May 2019 17:31:06 +0200 Subject: [PATCH] Fix the postfix relay configuration for Ubuntu >= 18.04. --- postfix-relay/templates/main.cf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/postfix-relay/templates/main.cf.j2 b/postfix-relay/templates/main.cf.j2 index a95cfb2..a27e497 100644 --- a/postfix-relay/templates/main.cf.j2 +++ b/postfix-relay/templates/main.cf.j2 @@ -63,6 +63,9 @@ smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = {{ postfix_smtp_sasl_security_options }} smtp_sasl_tls_security_options = {{ postfix_smtp_sasl_tls_security_options }} smtp_sasl_mechanism_filter = {{ postfix_smtp_sasl_mechanism_filter }} +{% if ansible_distribution_major_version >= '18' %} +smtpd_relay_restrictions = permit_sasl_authenticated, reject +{% endif %} {% endif %} {% if postfix_relay_server %} smtpd_sasl_path = smtpd