Reporting

sendmail command throwing error and NO email is getting triggered

pkumar9610
Explorer

HI Friends, 

I am using below command to check the email alerts but its throwing error and not able to send emails. Can you please help here

Command: index=123 info | sendemail to="kumar@xxx.com" subject=AzureTestAlert from="splunk"

Error on UI: command="sendemail", [Errno -2] Name or service not known while sending mail to: kumar@xxx.com

Error in python.log:

2020-09-03 17:25:24,113 -0700 ERROR     sendemail:143 - Sending email. subject="Splunk Alert: testAlert", results_link="https://splunk-shc-splunk-search-head-0:8000/app/search/@go?sid=scheduler__admin__search__testAlert_at_1599179100_51_CC555C75-B9DE-43D9-93D3-D1C60A6059CF", recipients="[u'kumar@xxx.com']", server="localhost"

Labels (2)
0 Karma

isoutamo
SplunkTrust
SplunkTrust
Is this working earlier or is this first time when you are trying it? Can you change from=splunk@your.doma.in?
r. Ismo
0 Karma

pkumar9610
Explorer

First time, this is new Splunk cluster setup on AKS using Splunk Operator 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Ok. Then the configuration is quite probably somehow broken.

Basically you should define the next to alert_actions.conf:

[default]
hostname = https://YOUR.SPLUNK.URL:PORT
mailserver = YOUR.MAIL.SERVER:PORT
use_ssl = 0
use_tls = 0
from = splunk@YOUR.MAIL.DOMAIN 

 Use_ssl & use_tls based on what your mail server is needing and also password for that user if needed.

r. Ismo

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...