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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...