Nagios XI Email Notifications for Microsoft 365 Outlook
This step-by-step guide shows how to send Nagios XI notifications through Outlook using secure SMTP with TLS and a Microsoft 365 app password. You’ll set up MFA, generate an app password, configure SMTP in Nagios XI, verify with test messages, and troubleshoot common errors.
Prerequisites
- Outlook mailbox that will appear in the From line (e.g.,
[email protected]). - MFA enabled on the sending account and tenant policy that allows app passwords.
- Nagios XI admin access and outbound network access from the XI server to
smtp.office365.comon port 587 (STARTTLS). - Accurate time/NTP and up-to-date CA certificates on the XI host to avoid TLS/certificate issues.
Step 1: Enable MFA and Generate a Microsoft 365 App Password
- Sign in to your Security info page for your work/school account and ensure two-step verification (MFA) is enabled.
- In Security info, select Add method → App password, then choose Generate app password. Name it “Nagios XI” or another memorable name if you have multiple app passwords.
- Copy the app password and store it securely for use in Nagios XI. Do not use your regular account password, and ensure no extra spaces are copied.

If App password isn’t available, your tenant likely blocks app passwords (Security Defaults or conditional access policy). Use Microsoft with OAuth2 in XI or an SMTP relay instead.
Step 2: Configure SMTP Settings in Nagios XI
- In XI, go to Admin → System Config → Email Settings.
- Set Send Mail From to a valid sender in your tenant, for example:
Nagios Alerts <[email protected]>. - Mail Method:
SMTP. - Configure SMTP Settings:
- Host:
smtp.office365.com - Port:
587 - Security:
TLS - Username: full mailbox UPN (e.g.,
[email protected]) - Password: the app password from Step 1
- Host:
- Click Update Settings.

If the test later fails with “client not authenticated” or 5.7.139, confirm Authenticated SMTP is enabled for the mailbox/tenant and that you are using STARTTLS on 587.
Step 3: Update User Email in Account Settings
- In XI, click the user icon → Account Settings.
- Update Email Address to the address that should receive notifications (e.g.,
[email protected]or another inbox). - Enter your current XI password to confirm.
- Click Update Settings.

Step 4: Send a Test Email
1. Return to Admin → System Config → Email Settings.
2. Click Send A Test Email to verify the SMTP configuration.

3. Check the destination inbox and Spam/Junk folder for the test message.

Step 5: Test Notifications with a Real Alert
- Assign the Microsoft 365–backed contact to a test host or service in XI.
- Trigger an alert (e.g., force a soft problem state or use Send Custom Notification).
- Verify that the alert email arrives (check Spam/Junk inbox if needed).
Troubleshooting
| Symptom | Likely Cause | Solution |
|---|---|---|
5.7.139 Authentication unsuccessful or 5.7.57 Client not authenticated | SMTP AUTH disabled for the mailbox/org, or wrong credentials/TLS mode. | Enable Authenticated SMTP for the mailbox; confirm port 587 + STARTTLS; re-enter the app password. |
| “App password” option missing in Security info | Tenant blocks app passwords (Security Defaults or policy). | Adjust policy (if allowed) or use Microsoft with OAuth2 in XI, or send via an SMTP relay. |
| Connection timeouts | Firewall egress blocked. | Allow outbound TCP 587 to smtp.office365.com. |
| TLS handshake/cert errors | Out-of-date CA bundle or system time not synced. | Update CA certificates; verify NTP; retry with TLS on 587. |
| Emails land in Spam | From/Envelope-From misalignment, content issues. | Use a sender in your tenant; configure SPF, DKIM, DMARC; write meaningful subjects/bodies (avoid bare links). |
| Works then stops | Org deprecates Basic Auth/SMTP AUTH or tightens policy. | Migrate to OAuth2 via Microsoft with OAuth2 in XI. |
Conclusion
Microsoft 365 App Password + SMTP AUTH can deliver Nagios XI notifications securely over TLS on port 587 with smtp.office365.com, but it depends on tenant policies that allow app passwords and Authenticated SMTP. Because Microsoft is phasing out Basic Authentication for SMTP client submission, treat app passwords as a short‑term solution and plan to migrate to OAuth2 in XI for long‑term reliability and security.
For further support, visit the Nagios Support Forum or the Nagios Knowledgebase.



