Smtp 已发送Grafana警报测试通知,但未收到电子邮件

Smtp 已发送Grafana警报测试通知,但未收到电子邮件,smtp,grafana,Smtp,Grafana,我想测试Grafana警报。我想在出现警报时接收电子邮件。首先,我在grafana.ini文件中设置了SMTP: #################################### SMTP / Emailing########################## [smtp] enabled = true host = localhost:25 user = # If the password contains # or ; you have to wrap it with trip

我想测试Grafana警报。我想在出现警报时接收电子邮件。首先,我在grafana.ini文件中设置了SMTP:

#################################### SMTP / Emailing##########################
[smtp]
enabled = true
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 = true
from_address = admin@grafana.localhost
from_name = Grafana

[emails]
;welcome_email_on_sign_up = false
在Grafana中的测试中,我设置了名称,类型:Email,发送所有警报,包括图像。 我的电子邮件在hotmail上

当我按send test时,我收到发送的测试通知,但没有收到电子邮件

以下是日志:

t=2018-07-06T11:09:54+0000 lvl=eror msg="can't read datasource provisioning files from directory" logger=provisioning.datasources path=/etc/grafana/provisioning/datasources
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing RenderingService" logger=server
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing TracingService" logger=server
t=2018-07-06T11:09:54+0000 lvl=info msg="Initializing Stream Manager"
t=2018-07-06T11:09:54+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2018-07-06T11:09:54+0000 lvl=eror msg="can't read dashboard provisioning files from directory" logger=provisioning.dashboard path=/etc/grafana/provisioning/dashboards
t=2018-07-06T11:09:57+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@gmail.com]
t=2018-07-06T11:09:57+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@gmail.com]
t=2018-07-06T11:10:26+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]
t=2018-07-06T11:10:27+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]
t=2018-07-06T11:12:31+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myEmail@hotmail.com]

我也用gmail进行了测试,结果是一样的。

你有SMTP服务器在本地主机端口25上监听吗?如果没有,您需要为Grafana运行一个或使用有效的SMTP配置。如果是,您需要检查邮件服务器日志,查看它对电子邮件的处理情况。

您指的是:还是使用有效的SMTP配置?关于日志,我已经发布了。Grafana不是邮件服务器,它需要能够通过SMTP将电子邮件发送到邮件服务器。您的Grafana配置在
[smtp]
部分中有
host=localhost:25
,这意味着Grafana将尝试向本地计算机上侦听端口25的邮件服务器发送电子邮件。启用Grafana发送电子邮件的最简单方法是将其配置为使用外部smtp服务器,每月少于10000封电子邮件,您可以免费使用。谢谢您的评论!Mailgun是免费的,但只向未经授权的电子邮件发送电子邮件。如果电子邮件被授权,我需要升级我的帐户。。。你知道其他解决办法吗?我听说过Postfix,它好吗?@xmlParser Postfix是一种流行的邮件服务器,但是运行邮件服务器是一项非常重要的工作,肯定超出了您的问题范围。我不知道mailgun中有任何限制将免费帐户限制为授权收件人。