Hi All,
my Grafana 6.5.1 runs under windows. I’m not able to switch on TLS for encripted smtp communication.
My smtp connection over port 25 is working fine. Even a powershell script to test sending an email over 465 is working fine:
$userName = 'mydomain\my_smtpuser'
$secStringPassword = '**secret**' | ConvertTo-SecureString -Force -AsPlainText
$server = 'x.x.x.x'
$from = 'noreply@myadress.com'
$to = 'myname@myadress.com'
$subject = 'TLS mail test'
$body = ('TLS mail test using mail server!' -f $server)
[PSCredential] $credOject = New-Object PSCredential ($userName, $secStringPassword)
Send-MailMessage -SmtpServer $server `
-To $to `
-From $from `
-Body $body `
-Subject $subject `
-Credential $credOject `
-UseSsl `
-Port 465
The smtp ip address is a windows mail proxy. My configuration is:
#################################### SMTP / Emailing #####################
[smtp]
enabled = true
# port 25 is working with the same config
#host = 1.2.3.4:25
host = 1.2.3.4:465
user = """xyz\abc"""
password = """xxxxxxx|"""
from_address = noreply@myadress.com
skip_verify = false
from_name = Grafana
ehlo_identity = grafana.app.mydomain.net
startTLS_policy = MandatoryStartTLS
########################################################################
The error message in grafana.log:
t=2020-11-05T11:25:36+0000 lvl=info msg="Sending alert notification to" logger=alerting.notifier.email addresses=[myname@myadress.com]
t=2020-11-05T11:25:36+0000 lvl=eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="Failed to send notification to email address: myname@myadress.com: tls: first record does not look like a TLS handshake"
repeating last message two times.
That sounds like: Grafana didn’t switch on TLS for some reason.
Any suggestions?
Regards AAK