Browse Source

Adding support for mail sending from smtp gateway

2.6.2/master
Philippe Caseiro 1 year ago
parent
commit
f9cb3d35b1
2 changed files with 12 additions and 7 deletions
  1. 1
    0
      dicos/70_prometheus.xml
  2. 11
    7
      tmpl/grafana.ini

+ 1
- 0
dicos/70_prometheus.xml View File

@@ -105,6 +105,7 @@
105 105
                     <variable name='grafana_auth_anonymous' type='string' description="Activer l'accès aux utilisateurs non enregistrés">
106 106
                         <value>false</value>
107 107
                     </variable>
108
+					<variable name='grafanaRootURL' type='string' description='Url publique de grafana (avec http:// ou https://)' mode='expert'/>
108 109
                 </family>
109 110
 
110 111
         <family name="alertes prometheus">

+ 11
- 7
tmpl/grafana.ini View File

@@ -40,11 +40,13 @@ domain = %%grafana_domain
40 40
 
41 41
 # Redirect to correct domain if host header does not match domain
42 42
 # Prevents DNS rebinding attacks
43
-;enforce_domain = false
43
+enforce_domain = true
44 44
 
45 45
 # The full public facing url you use in browser, used for redirects and emails
46 46
 # If you use reverse proxy and sub path specify full url (with sub path)
47
-;root_url = http://localhost:3000
47
+%if %%is_empty('grafanaRootURL')
48
+root_url = %%grafanaRootURL
49
+%end if
48 50
 
49 51
 # Log web requests
50 52
 ;router_logging = false
@@ -299,18 +301,20 @@ enabled = %%grafana_auth_anonymous
299 301
 
300 302
 #################################### SMTP / Emailing ##########################
301 303
 [smtp]
302
-;enabled = false
303
-;host = localhost:25
304
+%if %%getVar('activer_exim_relay_smtp','non') == 'oui'
305
+enabled = true
306
+host = %%exim_relay_smtp:25
304 307
 ;user =
305 308
 # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
306 309
 ;password =
307 310
 ;cert_file =
308 311
 ;key_file =
309
-;skip_verify = false
310
-;from_address = admin@grafana.localhost
311
-;from_name = Grafana
312
+skip_verify = true
313
+from_address = %%system_mail_from
314
+from_name = Grafana
312 315
 # EHLO identity in SMTP dialog (defaults to instance_name)
313 316
 ;ehlo_identity = dashboard.example.com
317
+%end if
314 318
 
315 319
 [emails]
316 320
 ;welcome_email_on_sign_up = false

Loading…
Cancel
Save