darrinh
(Darrin Hodges)
November 23, 2021, 3:37am
1
Graylog cannot send email, although it can be sent via the cli.
OS Information: Ubuntu 20.04
Graylog: 4.2.1 (3 nodes)
Mail can be sent via the cli with no issue. Testing an email notification results in the follow message in system → overview:
The Graylog server encountered an error while trying to send an email. This is the detailed error message: java.lang.NullPointerException
I cannot find any other occurrence of any related message in the logs, any idea on what the problem may be ?
many thanks
Darrin
gsmith
(GSmith)
November 23, 2021, 3:57am
2
Hello,
Did you configure your GL server.conf for mail?
transport_email_enabled = true
transport_email_hostname = localhost
tansport_email_port = 25
transport_email_subject_prefix = [graylog]
transport_email_from_email = root@domain.com
transport_email_web_interface_url = https://8.8.8.8:9000
darrinh
(Darrin Hodges)
November 23, 2021, 4:05am
3
Thanks Gsmith, the settings we have are:
Email transport
transport_email_enabled = true
transport_email_hostname = mail.foo.com
transport_email_port = 25
transport_email_use_tls = true
transport_email_use_ssl = false
Does it require the prefix, from email and interface url as well?
many thanks
Darrin
darrinh
(Darrin Hodges)
November 23, 2021, 4:11am
4
Ok, adding those extra field has changed the error:
Error: Notification has email recipients and is triggered, but sending emails failed. Sending the email to the following server failed : mail.foo.com:25
gsmith
(GSmith)
November 23, 2021, 4:15am
5
Is this a dedicated email server? or is this from your localhost?
EDIT:
Not that I know of. I did have to use transport_email_web_interface_url =
which was my GL server IP Address. It been a long time ago since I configured this
darrinh
(Darrin Hodges)
November 23, 2021, 4:21am
6
Thanks for your help, in the end it was using the wrong mail server.
many thanks
Darrin
2 Likes
gsmith
(GSmith)
November 23, 2021, 4:22am
7
I have don that also in the past. Glad you fixed it and thanks for posting your fix.
tmacgbay
(Tmacgbay)
November 23, 2021, 12:07pm
8
Mark the answer for future searches!
1 Like
system
(system)
Closed
December 7, 2021, 12:08pm
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.