SMTP and Azure AD

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
DFaught
Posts: 62
Joined: Tue Sep 26, 2017 12:50 pm

SMTP and Azure AD

Post by DFaught »

Hi,

We have recently changed over to an authenticated SMTP service using Microsoft Active Directory and Azure. Using the debug methods in https://support.nagios.com/kb/article/p ... g-820.html it appears that the TLS and SMTP connection works to a point and then says that the authentication is unsuccessful and the Password command failed. We have tested the same user account and password on a local workstation using Powershell and it works just fine. I have attached the debug log. What do we need to do to get this to work properly?

Thank you for your help,
Dave

P.S. I have also attached the System Profile file.

Moderator's Note: The profile has been shared with the support team but has been removed from the public forum.
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SMTP and Azure AD

Post by ssax »

Usually when I see these words:

Code: Select all

SMTP Error: Could not authenticate.
I read them as Should not authenticate.

Please blank out the user/pass in the Admin > Email Settings and then test it again.

Your email admins likely allowed relaying without auth to your mail server (just a guess, this is what happens with exchange) so when you try to do that it fails. Please try it and report the results. If you wanted to force auth with relaying it's likely a setting in your mail server.
DFaught
Posts: 62
Joined: Tue Sep 26, 2017 12:50 pm

Re: SMTP and Azure AD

Post by DFaught »

I blanked out the userID and password and got this:

A test email was sent to [email protected]
----
Mailer said: [04-19-2021 09:12:17] The following From address failed: [email protected] : MAIL FROM command failed,5.7.57 Client not authenticated to send mail. [CH2PR20CA0002.namprd20.prod.outlook.com] ,530,SMTP server error: MAIL FROM command failed Detail: 5.7.57 Client not authenticated to send mail. [CH2PR20CA0002.namprd20.prod.outlook.com] SMTP code: 530SMTP server error: MAIL FROM command failed Detail: 5.7.57 Client not authenticated to send mail. [CH2PR20CA0002.namprd20.prod.outlook.com] SMTP code: 530 (method=smtp;host=smtp.office365.com;port=587;security=tls), Referer: admin/testemail.php
An error occurred sending a test email!

It's not MY mail server, it is a Microsoft cloud service, so it's unlikely that changes can be made there.
DFaught
Posts: 62
Joined: Tue Sep 26, 2017 12:50 pm

Re: SMTP and Azure AD

Post by DFaught »

This is solved. I had to put in both the Send Mail From and the Username with the domain, "@footlocker.com", so that Active Directory knew where to look up the user account.

Thank you for your help!

Regards,
Dave
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SMTP and Azure AD

Post by ssax »

Glad you were able to fix that! Let us know when we're okay to lock this up and mark it as resolved.
DFaught
Posts: 62
Joined: Tue Sep 26, 2017 12:50 pm

Re: SMTP and Azure AD

Post by DFaught »

Yes, this is resolved.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SMTP and Azure AD

Post by scottwilkerson »

DFaught wrote:Yes, this is resolved.
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked