Grafana

Check what an alert actually looks like, without waking anyone up.

1Enable SMTP

grafana.ini
# grafana.ini
[smtp]
enabled = true
host = smtp.mailclutch.com:587
user = mc_0000000000000000
password = pw_0000000000000000
from_address = staging@example.com
from_name = Grafana

In a container, the same settings are environment variables:

Your sandbox credentials
GF_SMTP_ENABLED=true
GF_SMTP_HOST=smtp.mailclutch.com:587
GF_SMTP_USER=mc_0000000000000000
GF_SMTP_PASSWORD=pw_0000000000000000
GF_SMTP_FROM_ADDRESS=staging@example.com

Restart Grafana for the change to take.

2Send a test message

Alerting → Contact points → the email contact point → **Test**. The message lands in the sandbox with the template it would really use.

Watch it land

Open the sandbox and the message is there — rendered HTML, plain text, raw source, attachments, and the SPF, DKIM and DMARC verdicts. It updates live, so you can leave it open next to your terminal.

Nothing is ever delivered onward, whatever address you send to; claim the inbox with an account and it stays.

Awaiting your email

Send from any address; it stops here rather than going onward. The inbox keeps what it catches for 24 hours.

What usually goes wrong

  • host is one field

    Grafana takes host:port together. A bare hostname falls back to port 25, which may be blocked on your network.

  • The password in a container

    GF_SMTP_PASSWORD shows up in docker inspect. That is fine for a sandbox pair, which expires on its own and can reach nothing but the sandbox.

Official documentationGrafana — SMTP configuration (opens in a new tab)