Alerting

How to get Office 365 integrated as my SMTP server for Splunk alerting?

mrgibbon
Contributor

Hi all,

I have an issue with trying to get Office 365 integrated as my SMTP server for Splunk alerting.

I’m putting in all the right details in the email settings page, smtp server, port, user/pass etc but getting errors on my Splunk:

command="sendemail", SMTP AUTH extension not supported by server. while sending mail to: blah@blah.com

and

command="sendemail", STARTTLS extension not supported by server

I'm using these settings:
Server name: smtp.office365.com
Port: 587
Encryption method: TLS

I'm using this command to test:
(fake email address for this post)

index=_internal | head 1 | sendemail to="blah@blah.com" from="splunk" use_tls=1

It might be the Linux box (Debian) itself rather than Splunk, but I just wanted to ask.
Cheers!

0 Karma
1 Solution

MuS
Legend

Hi mrgibbon,

the sendmail command uses by default localhost if server is not specified:

server
Syntax: server=<string>
Description: If the SMTP server is not local, use this to specify it.
Default: localhost

See the docs for more details http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Sendemail
And reading some Microsoft doc https://support.office.com/en-us/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7... it looks like it supports SSL and TLS

Hope this helps ...

cheers, MuS

View solution in original post

MuS
Legend

Hi mrgibbon,

the sendmail command uses by default localhost if server is not specified:

server
Syntax: server=<string>
Description: If the SMTP server is not local, use this to specify it.
Default: localhost

See the docs for more details http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Sendemail
And reading some Microsoft doc https://support.office.com/en-us/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7... it looks like it supports SSL and TLS

Hope this helps ...

cheers, MuS

Tyler
Explorer

This was it for me. Even though I had set Mail Server Settings (under Server settings > Email settings), it still needed me to specify the server.

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

you should add those general configurations to: alert_actions.conf ([email]). If I recall right some of those configurations must be in ..../system/local/alert_actions.conf not on separate app? I'm not sure if this is still valid information.

r. Ismo

0 Karma

mrgibbon
Contributor

Hey MuS!

Yep, I forgot about the localhost thing!
This command got it over the line:

index=_internal | head 1 | sendemail to="blah@blah.com" server=smtp.office365.com:587 from=blah@blah.com use_tls=1

I had to use the actually user in the from field as well.
Well done sir!

Cheers!

jmonroy
Engager

Thank you @mrgibbon  you are absolutely right! now everything is working fine...  your example helped me a lot

Cheers!

JM 

0 Karma
Get Updates on the Splunk Community!

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...