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!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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