Support de l'authentification SMTP dans la configuration GOGS

This commit is contained in:
Philippe Caseiro 2017-05-30 15:02:09 +02:00
parent af9d3a6e46
commit 40547fc477
2 changed files with 15 additions and 2 deletions

View File

@ -38,6 +38,12 @@
<value>non</value>
</variable>
<variable name='gogs_mail_from' type='string' description="Adresse courriel a l'origine des messages de la forge"/>
<variable name='gogs_mail_auth' type='oui/non' description="Utiliser un compte pour le serveur smtp">
<value>non</value>
</variable>
<variable name='gogs_email_user' type='string' description="Nom de l'utilisateur SMTP"/>
<variable name='gogs_email_password' type='string' description="Mot de passe de l'utilisateur"/>
<variable name='gogs_web_name' type='string' description='Nom DNS de la forge' mandatory='True'/>
<variable name='git_root' type='string' description='Repertoire des dépôts git' mandatory='True'>
<value>/var/db/gogs/repo</value>
@ -73,6 +79,11 @@
<target type='family'>forge</target>
<target type='service_accesslist'>gogs_ssh</target>
</condition>
<condition name='disabled_if_in' source='gogs_mail_auth'>
<param>non</param>
<target type='variable'>gogs_email_user</target>
<target type='variable'>gogs_email_password</target>
</condition>
<fill name='calc_multi_condition' target='gogs_nginx'>
<param>oui</param>
<param name="operator">OR</param>

View File

@ -141,9 +141,11 @@ FROM = %%system_mail_from
%else
FROM = %%gogs_mail_from
%end if
%if %%getVar('gogs_mail_auth','non') == 'oui'
; Mailer user name and password
; USER =
; PASSWD =
USER = %%gogs_email_user
PASSWD = %%gogs_email_password
%end if
%else
[mailer]
ENABLED = false