Sign in
Get Help

How to Send Mail Notifications to Office365



Note - The default port for the 365 configuration in the file is 587.  This may need to be changed to port 25, depending on customer requirement.  This is addressed by looking for:


define(`RELAY_MAILER_ARGS', `TCP $h 25')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 25')dnl
See these considerations from Microsoft-

If you are an Office365 customer there are a number of steps you need to configure to send mail notifications from your applications or Unitrends Appliance to your Office365 domain mailboxes.

Office 365 supports these options for sending email from an application:

  1. Authenticate your device or application directly with an Office 365 mailbox (SMTP client submission)*
  2. Send mail direct from your printer or application to Office 365 (Direct send)
  3. Configure a connector to send mail using Office 365 (SMTP relay)

* Unitrends appliances currently cannot use option Option 1 out of the box.

This article will explain how to use Option 2 (Direct Send) and Option 3 (SMTP Relay), as well as explain the differences.




Direct Send

If you just want to send mail alerts and reports to your Office365 mailboxes this method is the easiest one as you don't have to configure anything else in Office365. But it will not work for sending mails to external mail addresses like or other domains.  Direct Send requires port 25.  This is a Microsoft requirement.

To configure, you only need to find out the MX DNS register for your domain and setup it in your application settings.

You can find it using powershell:

PS> Resolve-DnsName -Name -Type MX

Name             Type   TTL   Section    NameExchange                                Preference
----             ----   ---   -------    ------------                                ----------    MX     9     Answer   0

In this scenario to send alerts to our user mailboxes we just need to configure as SMTP.


And that is all! Now you should be able to receive notifications in your Office365 mailboxes from your appliance or applications.

SMTP Relay

This method allows to send mail to other domains but it requires your Office365 administrator to create a mail flow connector that allows relay all mails that are coming from the public IP address used by the appliance to connect to Office365.

  1. You can find out the public IP address being used by your appliance to connect to Internet running any of these commands inside the appliance console:
    [root@ueb08 ~]# curl -s
    [root@ueb08 ~]# curl -s
    [root@ueb08 ~]# curl
    [root@ueb08 ~]# curl -s
  2. Login to Office365 Exchange Admin Center
  3. Select Mail Flow -> Connectors
  4. Add new connector
  5. Select from ” Your Organization to Office365″
  6. Give a name to the connector
  7. Select identify by verifying IP address and enter your public IP Address.
  8. Save

Once this is done you can configure Unitrends Appliance to use your MX DNS register as SMTP Server to send mails to Office365 mailboxes and also to external domains.

PS> Resolve-DnsName -Name -Type MX

SMTP Server:


Check Spam Databases

Office365 will block email if your IP address is blacklisted in a spam database.

IP ranges normally assigned to ISP end-user broadband connections are blacklisted as they should not be delivering unauthenticated SMTP email to any Internet mail server using these methods.

You can use website to check if your IP is listed and request removal.


SEE ALSO  How do I change the sendmail 'from' address and domain on the appliance emails?

Have more questions?

Contact us

Was this article helpful?
0 out of 0 found this helpful

Provide feedback for the Documentation team!

Browse this section