From 93c235c52fa009a30e88fd190d77fd82d0fa8f8e Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Fri, 29 May 2015 16:43:26 +0200 Subject: [PATCH] dicos/50_gogs.xml: Ajout de variables pour l'envois d'emails tmpl/gogs.conf: Ajout de la configuraiton pour l'envois de mails --- dicos/50_gogs.xml | 7 +++++++ tmpl/gogs.conf | 22 ++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/dicos/50_gogs.xml b/dicos/50_gogs.xml index 4745deb..181933a 100644 --- a/dicos/50_gogs.xml +++ b/dicos/50_gogs.xml @@ -31,6 +31,13 @@ + + Forge Numérique EOLE + + + non + + /var/db/gogs/repo diff --git a/tmpl/gogs.conf b/tmpl/gogs.conf index a775d08..24917b4 100644 --- a/tmpl/gogs.conf +++ b/tmpl/gogs.conf @@ -2,7 +2,7 @@ # PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE ; App name that shows on every page title -APP_NAME = Gogs: Go Git Service +APP_NAME = %%gogs_name ; Change it if you run locally RUN_USER = gogs ; Either "dev", "prod" or "test", default is "dev" @@ -108,6 +108,7 @@ DELIVER_TIMEOUT = 5 ; Allow insecure certification SKIP_TLS_VERIFY = false +%if %%getVar('gogs_mail','non') == 'oui' [mailer] ENABLED = false ; Buffer length of channel, keep it as it is if you don't know what it is. @@ -118,18 +119,27 @@ SUBJECT = %(APP_NAME)s ; Gmail: smtp.gmail.com:587 ; QQ: smtp.qq.com:25 ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used. -HOST = +%if %%getVar('activer_exim_relay_smtp','non') == 'oui' +HOST = %%exim_relay_smtp +%else +HOST = 127.0.0.1 +%end if ; Do not verify the certificate of the server. Only use this for self-signed certificates -SKIP_VERIFY = +SKIP_VERIFY = true ; Use client certificate USE_CERTIFICATE = false CERT_FILE = custom/mailer/cert.pem KEY_FILE = custom/mailer/key.pem ; Mail from address, RFC 5322. This can be just an email address, or the "Name" format -FROM = +%if %%getVar('gogs_mail_from','M-M-M-M') == 'M-M-M-M' +FROM = %%system_mail_from +%else +FROM = %%gogs_mail_from +%end if ; Mailer user name and password -USER = -PASSWD = +; USER = +; PASSWD = +%end if [oauth] ENABLED = false