From b9f91eeb4c4df87029e02fe4c5e4b7b8388a3387 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 23 Jul 2015 22:55:24 +0200 Subject: [PATCH] library/roles/postfix-relay: All the actions are by default disabled. dnet-openaire: configure the puma development VM as a relay client. --- postfix-relay/defaults/main.yml | 6 ++++-- postfix-relay/tasks/main.yml | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/postfix-relay/defaults/main.yml b/postfix-relay/defaults/main.yml index 15e1a0b..3e716ca 100644 --- a/postfix-relay/defaults/main.yml +++ b/postfix-relay/defaults/main.yml @@ -1,3 +1,6 @@ +--- +# Set it to true when you want configure your machine to send email to a relay +postfix_relay_client: False postfix_biff: "no" postfix_append_dot_mydomain: "no" postfix_use_relay_host: True @@ -6,7 +9,7 @@ postfix_use_sasl_auth: True postfix_smtp_sasl_auth_enable: "yes" postfix_smtp_create_relay_user: True # See vars/isti-global.yml -postfix_relay_host: smtp-relay.research-infrastructures.eu +postfix_relay_host: smtp-relay.example.com postfix_relay_port: 587 postfix_default_destination_concurrency_limit: 20 #postfix_smtp_relay_user: smtp-user @@ -15,7 +18,6 @@ postfix_default_destination_concurrency_limit: 20 # The following options are used only whe postfix_relay_server is set to True postfix_relay_server: False -#postfix_mynetworks: '{{ network.nmis }}, hash:/etc/postfix/network_table' postfix_mynetworks: hash:/etc/postfix/network_table postfix_interfaces: all postfix_inet_protocols: all diff --git a/postfix-relay/tasks/main.yml b/postfix-relay/tasks/main.yml index c0a9445..609f4e0 100644 --- a/postfix-relay/tasks/main.yml +++ b/postfix-relay/tasks/main.yml @@ -1,6 +1,9 @@ --- - include: smtp-common-packages.yml + when: postfix_relay_client - include: smtp-sasl-auth.yml - when: postfix_use_sasl_auth + when: + - postfix_use_sasl_auth + - postfix_relay_client - include: postfix-relay-server.yml when: postfix_relay_server