I’m trying to send out e-mail alerts with Grafana version 7.2.2 and the following configuration:
enabled = true
host = smtp.office365.com:587
user = email@company
password = XXXXXXX
skip_verify = true
from_address = email@company
from_name = Grafana
I accessed the Grafana logs and received the following error
t=2021-08-05T09:45:09-0400 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="Failed to send notification to email addresses: email@company: dial tcp 22.214.171.124:587: connect: permission denied"
Basically, I am not able to reach the SMTP server. By editing the password from my e-mail into a random/wrong one I wasn’t able to see any login attempts on the admin portal.
It seems like the requests aren’t making it to the server to be blocked, they are being denied sooner.
I’m not sure if it is related to us using selinux. In case of that I did following changes:
$ semanage port -m -t http_port_t -p tcp 587
$ sudo setsebool -P httpd_can_sendmail 1
$ sudo setsebool -P httpd_can_network_connect 1
Any idea how to troubleshoot that issue?