title: How can I prepare yaml files to modify the SMTP/Emailing section in grafana?
body: <p>I'm using <code>grafana/grafana:6.1.3</code> in combination with <code>prom/alertmanager:v0.16.2</code> (and some other in my opinion not relevant images).<br> I configured the alertmanager to send e-mails via SMTP if a specific event occurs.<br>
  But there was nothing in my inbox, which is why I checked out the grafana docker log:</p>
  
  <pre><code>root@PRIVATE_INFORMATION:~# docker logs grafana | grep -n "alert"
  162:t=2019-05-20T11:42:26+0000 lvl=info msg="Executing migration" logger=migrator id="create alert table v1"
  [...]
  197:t=2019-05-20T11:42:28+0000 lvl=info msg="Executing migration" logger=migrator id="Update alert annotations and set TEXT to empty"
  292:t=2019-05-20T11:44:28+0000 lvl=info msg="Request Completed" logger=context userId=0 orgId=0 uname= method=GET path=/api/alerts/states-for-dashboard status=401 remote_addr=PRIVATE_INFORMATION time_ms=0 size=26 referer="PRIVATE_INFORMATION"
  297:t=2019-05-20T11:48:01+0000 lvl=info msg="New state change" logger=alerting.resultHandler alertId=1 newState=ok prev state=unknown
  298:t=2019-05-20T11:48:33+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[PRIVATE@INFORMATION]
  299:t=2019-05-20T11:48:33+0000 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="SMTP not configured, check your grafana.ini config file's [smtp] section."
  300:t=2019-05-20T11:48:33+0000 lvl=eror msg="failed to send notification" logger=alerting.notifier uid= error="SMTP not configured, check your grafana.ini config file's [smtp] section."
  [...]
  </code></pre>
  
  <p>I couldn't find any "grafana.ini", on my server. <br><br>
  { EDIT: I found two. One in "/var/lib/docker/overlay2/fe7[...]db3/diff/etc/grafana/grafana.ini", another in "/var/lib/docker/overlay2/079[...]26d/merged/etc/grafana/grafana.ini". Both contain the same information like the "sample-ini" }<br><br>Instead, I found a "default.ini" and a "sample.ini" file inside the running grafana container. The "default.ini" contained nothing related to SMTP, but "sample.ini" contained the following section:<br></p>
  
  <pre><code>#################################### SMTP / Emailing ##########################
  [smtp]
  ;enabled = false
  ;host = localhost:25
  ;user =
  # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
  ;password =
  ;cert_file =
  ;key_file =
  ;skip_verify = false
  ;from_address = admin@grafana.localhost
  ;from_name = Grafana
  # EHLO identity in SMTP dialog (defaults to instance_name)
  ;ehlo_identity = dashboard.example.com
  
  [emails]
  ;welcome_email_on_sign_up = false
  </code></pre>
  
  <p>Now, I guess, this is the place where I should have configured SMTP. Does anybody know, how to tell docker-compose.yml / ansible, that I want to configure this section during container set up?<br>
  I already defined the SMTP host and other information inside the alert container.</p>