I am currently working with Grafana 8.4.3 in a Docker container, where Docker runs within wsl2 on Windows 10.
To make my SMTP notifications work I configured the grafana.ini with settings including access credentials (login and password) I got from my corporate smtp provider.
this sounds related to your Alerting version. Are you using the legacy alerting platform or the new alerting platform that was introdced in v8 as an opt-in? It is now default in 9.
I’ve just updated Grafana to 9.2.4.
If Grafana runs directly on Windows everything is fine. If I run it in a Docker container on Windows (I use Docker Desktop) I get the 501 error from SMTP server. Is there any explanation for the difference in Grafanas
behaviour?
This is not a Grafana issue but is related to Windows internal networking for Docker as this feature i.e. network_mode: host seems to be not yet implemented
There is no special combinaiton of Docker and SMTP. It is all about the configuration settings so that SMTP is reachable and can send out emails.
The only limitation of Docker for SMTP comes in windows where the host network will not work (which I had posted above with a few reference links).
You will find some similar posts here in the community if you search for e.g. “Grafana SMTP Docker” where different users had proposed different solution strategies which had worked for them.
Also similarly, you can find some more references outside the community forums e.g. here
Thanks, I’ve check almost all related post from the past few years. Except for the host network solution (which isn’t working for me) there is little to no explanation of the actual problem.