Splunk Search

Sendmail - [Errno 101] Network is unreachable while sending mail

clementros
Path Finder

I'm trying to use sendmail command with the gmail smtp server.

I use the "Search & Reporting" App to apply the following search:

index=nbtktfed sourcetype="nbtktfed.err" status=ERROR 
| stats count
| sendemail server="smtp.gmail.com:465" to="ros.clement@gmail.com" sendresults=true subject="Test mail" message="This message is send with the sendmail command of splunk" use_tls=true

This command return the following error in GUI :

command="sendemail", [Errno 101] Network is unreachable while sending mail to: ros.clement@gmail.com 

My serveur is able to ping the "smtp.gmail.com" server. But when i tried to execute a telnet this return "Network is unreachable".

Here is my Server setting > Email settings configuration :

alt text

0 Karma
1 Solution

nickhills
Ultra Champion

Are you certain there are no firewalls (local or network) preventing traffic leaving your network on the mail port?

If you are in an enterprise, its quite common for outbound email ports to be blocked

If my comment helps, please give it a thumbs up!

View solution in original post

nickhills
Ultra Champion

Are you certain there are no firewalls (local or network) preventing traffic leaving your network on the mail port?

If you are in an enterprise, its quite common for outbound email ports to be blocked

If my comment helps, please give it a thumbs up!

clementros
Path Finder

HI @nickhillscpl,

I have a virtual machine (CentOS 7) wich i'm sure the firewalld service is stop and disable.

On this VM i have a docker container (Debian 9) with splunk entreprise. When i run the command "iptables -L" debian say "iptables command not found".

Is there another firewall on Debian 9 ?

If outbound email ports are blocked, how can i test sendmail on local ?

0 Karma

nickhills
Ultra Champion

I would start with your network/comms team - if you have perimeter firewalls blocking ports, they will likely have to make the changes to allow your traffic to flow.

I think debian uses firewalld, but I'm more of an RHEL guy!

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...