What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Error sending "Email": Connection failed ("smtp.office365.com")

Votes:

0

Hi,

I'm having problems configuring Office 365 SMTP relay in notification settings. Particular configuration values work well when tested from the same server via PowerShell:

Send-MailMessage -Body "Test" -From "[email protected]" -To "[email protected]" -Credential (Get-Credential) -SmtpServer "smtp.office365.com" -UseSsl $true -Port 587

and the message was received.

Is there any more granularity of logs, where I can find more information why "Connection failed" please? Notification delivery configuration looks as follows:

SMTP Delivery Mechanism:Use SMTP relay server
Sender Emal:[email protected]
Sender Name:default
HELO ident:server_hostname (Office 365 SMTP relay does not require sender identity)
SMTP Relay Server:smtp.office365.com
SMTP Relay SMTP Port:587
SMTP Relay Authentication:Use Standard SMTP authentication
SMTP Relay User:[email protected]
Use Encrypted Connection:If Supported by server
SSL Method:Both 'SSL V2 or V3' or 'TLS V1' tested

PRTG Version: 17.3.32.2339+ OS version: Windows Server 2016

Many thanks!

notification-email office365 smtp-relay-server

Created on Jul 28, 2017 9:14:31 AM



Best Answer

Accepted Answer

Votes:

0

I have just tested the PRTG Mail Delivery using Office365. This is what the Set-up Looked like:

SMTP Delivery Mechanism:Use SMTP relay server
Sender Emal:[email protected]
Sender Name:PRTG
HELO ident:prtgserver.domain.tld
SMTP Relay Server:smtp.office365.com
SMTP Relay SMTP Port:587
SMTP Relay Authentication:Use standard SMTP authentication
SMTP Relay User:[email protected]
Use Encrypted Connection:If supported by server
SSL Method:'SSL V2 or V3' or 'TLS v1.2'

Messages where sent sucessfully in PRTG Version 17.3.33.2753 with the set-up above. Please note that this released includes some improvements for TLS:

IMPROVEDNOTIFICATIONS
SMTP DeliverySMTP delivery for email notifications now supports TLS V1.1 and TLS V1.2.



Best Regards,
Luciano Lingnau [Paessler Support]

Created on Sep 1, 2017 1:01:38 PM by  Luciano Lingnau [Paessler]

Last change on Sep 22, 2017 8:25:33 AM by  Luciano Lingnau [Paessler]



14 Replies

Votes:

0

Hi there,

Thanks for the nice formatting! :) Is this an actual o365 Exchange server? Or a plain outlook account?


Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 28, 2017 9:57:44 AM by  Stephan Linke [Paessler Support]

Last change on Jul 28, 2017 9:58:00 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hello,

[email protected] is a shared mailbox in cloud. smtp.office365.com is general relay address - I don't want to use specific exchange server for various reasons. SMTP relay best practice is described here:

https://support.office.com/en-us/article/How-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4?ui=en-US&rs=en-US&ad=US&fromAR=1

Created on Jul 28, 2017 10:15:29 AM



Votes:

0

Time to enable the notification delivery debug log:

  1. Open up regedit
  2. Navigate to HKEY_LOCAL_MACHINE\Software\Wow6432Node\Paessler\PRTG Network Monitor\Server\Core\
  3. Create the DWORD value LogNotificationDelivery and set it to 1
  4. The log files will be generated with their timestamp as name in the following subfolders of the \Logs (Debug) folder in your PRTG data directory:
  • Notification Delivery Debug Log (MX Server)
  • Notification Delivery Debug Log (SMTP Relay 1)
  • Notification Delivery Debug Log (SMTP Relay 2)
  • Notification Delivery Debug Log (HTTP)
  • Notification Delivery Debug Log (SMS)
  • Notification Delivery Debug Log (Amazon SNS) (as of PRTG 15.4.21)

They should provide further insights. If you like, upload them and post the link to it.
I won't publish the posting, in case it contains confidential information. Make sure to disable it again.


Created on Jul 28, 2017 10:40:26 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi again,

thanks for the quick reply :)

After the LogNotificationDelivery key was added, and Core service restarted, only this shows in logs:

Stat Disconnected.
Stat Disconnected.
Error sending "Email": Connection failed ("smtp.office365.com")

Created on Jul 28, 2017 10:52:47 AM



Votes:

0

Any firewall issues or something like that? Antivirus keeping PRTG Core Server.exe from connecting?


Created on Jul 28, 2017 10:56:49 AM by  Stephan Linke [Paessler Support]



Votes:

0

Windows Firewall allows all outgoing connections without limitations. Antivirus is not blocking specific processes / communications. My test via PowerShell was successful - TCP connection can be established, authentication pass, and I can send emails from this server via given configuration.

I also checked logs on physical firewall, and there is no denies towards smtp.office365.com, only SYN. There is no sign of PRTG trying to reach the SMTP relay on port tcp/587 (which I find strange), but just attempts on tcp/80 - which can easily be SaaS check sensor.

Could it be PRTG is utilizing Windows telnet for sending messages? Otherwise i don't understand why 'HELO ident' mandatory in the config. In that case, there can be some problems with TLS. I did not test telnet as such.

Created on Jul 28, 2017 11:05:22 AM



Votes:

0

No proxy as well? Weird - could you tap the connection with wireshark on the PRTG Server to verify that no outgoing connection is established?


Created on Jul 28, 2017 11:09:32 AM by  Stephan Linke [Paessler Support]



Votes:

0

Windows system proxy (winhttp) and Internet proxies are disabled, all connections are direct.

Wireshark revealed this behaviour:

server -> office365:587 SYN
server -> office365:587 SYN
office365 -> server RST

which fails twice, and then repeats. It really looks like an authentication issue to me.

Created on Jul 28, 2017 11:26:12 AM



Votes:

0

Can you check if a simple mail client (other than PowerShell) works fine on the PRTG server?


Created on Jul 28, 2017 12:07:36 PM by  Stephan Linke [Paessler Support]



Votes:

0

Well, i don't have any other simple email client available, and don't want to install any unnecessary thick client on the server just for test.

I googled a little, and it seems to me telnet cannot be used for Office 365 connections, because it's lacking the right authentication methods. So if telnet is internally used in PRTG, it will never work with Office 365.

I will continue with more research next week. Thanks for your help so far.

Created on Jul 28, 2017 1:46:22 PM



Votes:

0

Alright then, let me know what you find :)


Created on Jul 31, 2017 7:58:18 AM by  Stephan Linke [Paessler Support]

Last change on Jul 31, 2017 9:45:55 AM by  Stephan Linke [Paessler Support]



Votes:

0

Hi again, Stephan,

i could not figure out what was wrong for sure, but my best bet is on TLS authentication, which is required for SMTP relay in Office 365.

Testing connection via PowerShell proved the functionality right according to this article: https://blogs.technet.microsoft.com/isantp1/2014/04/11/test-smtp-relay-in-office365/

Finally, i managed to solve the problem by installing SMTP virtual server as a relay on the same server as PRTG. More or less as described in this article: https://support.office.com/en-us/article/How-to-configure-IIS-for-relay-with-Office-365-eb57abd2-3859-4e79-b721-2ed1f0f579c9?ui=en-US&rs=en-US&ad=US&fromAR=1

Until TLS authentication is working correctly, this workaround will suffice.

Thanks again for your help.

Created on Jul 31, 2017 9:35:00 AM



Votes:

0

Nice workaround! If we receive complaints about PRTG not working with o365, we'll look into this.


Created on Jul 31, 2017 9:47:23 AM by  Stephan Linke [Paessler Support]



Accepted Answer

Votes:

0

I have just tested the PRTG Mail Delivery using Office365. This is what the Set-up Looked like:

SMTP Delivery Mechanism:Use SMTP relay server
Sender Emal:[email protected]
Sender Name:PRTG
HELO ident:prtgserver.domain.tld
SMTP Relay Server:smtp.office365.com
SMTP Relay SMTP Port:587
SMTP Relay Authentication:Use standard SMTP authentication
SMTP Relay User:[email protected]
Use Encrypted Connection:If supported by server
SSL Method:'SSL V2 or V3' or 'TLS v1.2'

Messages where sent sucessfully in PRTG Version 17.3.33.2753 with the set-up above. Please note that this released includes some improvements for TLS:

IMPROVEDNOTIFICATIONS
SMTP DeliverySMTP delivery for email notifications now supports TLS V1.1 and TLS V1.2.



Best Regards,
Luciano Lingnau [Paessler Support]

Created on Sep 1, 2017 1:01:38 PM by  Luciano Lingnau [Paessler]

Last change on Sep 22, 2017 8:25:33 AM by  Luciano Lingnau [Paessler]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.