diff --git a/defaults/main.yml b/defaults/main.yml index 852dce5..6169224 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- postfix_relay_sasl_host: smtp.gmail.com +postfix_relay_sasl_port: 587 postfix_relay_sasl_user: user postfix_relay_sasl_domain: gmail.com postfix_relay_sasl_passwd: secure diff --git a/templates/etc/postfix/main.cf.j2 b/templates/etc/postfix/main.cf.j2 index 20d28ce..1ca0c22 100644 --- a/templates/etc/postfix/main.cf.j2 +++ b/templates/etc/postfix/main.cf.j2 @@ -325,7 +325,7 @@ mynetworks = 127.0.0.1 #relayhost = [mailserver.isp.tld] #relayhost = uucphost #relayhost = [an.ip.add.ress] -relayhost = [hamal.uberspace.de]:587 +relayhost = [{{ postfix_relay_sasl_host }}]:{{ postfix_relay_sasl_port }} # REJECTING UNKNOWN RELAY USERS # diff --git a/templates/etc/postfix/sasl_passwd.j2 b/templates/etc/postfix/sasl_passwd.j2 index d5e73a5..4346b14 100644 --- a/templates/etc/postfix/sasl_passwd.j2 +++ b/templates/etc/postfix/sasl_passwd.j2 @@ -1,3 +1,3 @@ # {{ ansible_managed }} -{{ postfix_relay_sasl_host }} {{ postfix_relay_sasl_user }}@{{ postfix_relay_sasl_domain }}:{{ postfix_relay_sasl_passwd }} +[{{ postfix_relay_sasl_host }}]:{{ postfix_relay_sasl_port }} {{ postfix_relay_sasl_user }}@{{ postfix_relay_sasl_domain }}:{{ postfix_relay_sasl_passwd }}