diff --git a/README-FR.md b/README-FR.md index 06fc0469f96124d718ce03435ba6543fd06bc531..f3dcbb5571d14966303141269cf6aba4774df53c 100644 --- a/README-FR.md +++ b/README-FR.md @@ -49,18 +49,18 @@ ynh_ignore_dyndns_server: False - `ynh_extra_domains` sont des sous-domaines optionnels. Ils permettent d'installer une application par sous-domaine (plus d'infos [ici](https://yunohost.org/fr/dns_subdomains)). - `ynh_ignore_dyndns_server` permet d'enregistrer les domaines avec un service de DNS dynamique (plus d'infos [ici](https://yunohost.org/fr/dns_dynamicip)). -### Configuration d'un relai SMTP +### Configuration d'un relais SMTP ```yml -# paramètres personnalisés du SMTP relai (A ne modifier qu'en cas de besoin) -ynh_new_smtp_relay: +# paramètres personnalisés du relais SMTP +ynh_smtp_relay: host: smtp.domain.tld port: 25 user: user1 password: Pa$$w0rd ``` -Yunohost possède son propre serveur SMTP natif mais il est aussi possible de configurer Yunohost pour qu'il utilise un relai SMTP à la place. -Pour faire cela, Décommentez les variables par défaut et mettez vos propres valeurs. Vous pouvez en apprendre plus sur les relais SMTP [ici](https://yunohost.org/fr/administrate/specific_use_cases/email_relay). +Yunohost possède son propre serveur SMTP natif mais il est aussi possible de configurer Yunohost pour qu'il utilise un relais SMTP à la place. +Pour faire cela, créez la variable `ynh_smtp_relay` et mettez vos propres valeurs. Vous pouvez en apprendre plus sur les relais SMTP [ici](https://yunohost.org/fr/administrate/specific_use_cases/email_relay). ### Gestion des utilisateurs diff --git a/README.md b/README.md index 7702ecb29f04d28f7c82068db6a8eaa564525abb..4a82b8ced44777c01dc31b7700d92a3dcd3f6918 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,8 @@ ynh_ignore_dyndns_server: False ### SMTP relay configuration ```yml -# SMTP custom settings (Only override if you need a SMTP relay) -ynh_new_smtp_relay: +# SMTP custom settings +ynh_smtp_relay: host: smtp.domain.tld port: 25 user: user1 @@ -61,7 +61,7 @@ ynh_new_smtp_relay: ``` There is a built-in SMTP server on Yunohost but you can also set up Yunohost to use a SMTP relay instead. -Uncomment the default variables and provide your own values. You can learn more about SMTP relay [here](https://yunohost.org/en/administrate/specific_use_cases/email_relay). +In order to do so, create the `ynh_smtp_relay` variable and provide your own values. You can learn more about SMTP relay [here](https://yunohost.org/en/administrate/specific_use_cases/email_relay). ### User management diff --git a/defaults/main.yml b/defaults/main.yml index 0492cbfed3b6be2ba6ffa9871e7af954b6dfec30..14b42ca5c4da019ceec7727e61c3aa6db17721a9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,11 +36,16 @@ ynh_users: null # lastname: Doe # mail_domain: domain.tld +# Do not touch this variable +# Just to have dict default value +ynh_smtp_relay: + value: null + # SMTP custom settings (Only override if you need a SMTP relay) -ynh_new_smtp_relay: - value: null # Do you touch this variable +# Example: +# ynh_smtp_relay: # host: smtp.domain.tld - # port: 25 + # port: "25" # user: user1 # password: Pa$$w0rd diff --git a/tasks/main.yml b/tasks/main.yml index a4c06782ce904b9f61a011ca0463c0dbf59e21f3..048022126a97752ab524ef026f0195147275096f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -62,7 +62,7 @@ - name: Configure SMTP relay ansible.builtin.include_tasks: smtp_relay.yml - loop: "{{ ynh_new_smtp_relay | dict2items }}" + loop: "{{ ynh_smtp_relay | dict2items }}" when: item.value - name: Add Yunohost users