Ask the Community
Groups
How to Send Mail Notifications to Office365 - Connect IT Community | Kaseya
<main> <article class="userContent"> <h2 data-id="issue"><strong>ISSUE</strong></h2> <p> </p> <p>Note - The default port for the 365 configuration in the sendmail<em>.</em>mc file is 587. This may need to be <a rel="nofollow" href="https://kaseya.vanillacommunities.com/kb/articles/aliases/unitrends/hc/en-us/articles/360013267378">changed to port 25,</a> depending on customer requirement. This is addressed by looking for:<br><br>define(`SMART_HOST',`mail<em>.</em>yourmailserver<em>.</em>com')dnl</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">define(`RELAY_MAILER_ARGS', `TCP $h 25')dnl define(`ESMTP_MAILER_ARGS', `TCP $h 25')dnl</pre> <pre class="code codeBlock" spellcheck="false" tabindex="0">See these considerations from Microsoft- <a href="/home/leaving?allowTrusted=1&target=https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FHow-to-set-up-a-multifunction-device-or-application-to-send-email-using-Office-365-69f58e99-c550-4274-ad18-c805d654b4c4">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</a> 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.</pre> <p>Office 365 supports these <strong>options</strong> for sending email from an application:</p> <ol><li>Authenticate your device or application directly with an Office 365 mailbox (SMTP client submission)*</li> <li>Send mail direct from your printer or application to Office 365 (Direct send)</li> <li>Configure a connector to send mail using Office 365 (SMTP relay)</li> </ol><p>* Unitrends appliances currently cannot use option Option 1 out of the box.</p> <p>This article will explain how to use Option 2 (Direct Send) and Option 3 (SMTP Relay), as well as explain the differences.</p> <h2 data-id="n-a"> </h2> <h2 data-id="resolution"><strong>RESOLUTION</strong></h2> <p> </p> <h2 data-id="direct-send">Direct Send</h2> <p>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 user@gmail<em>.</em>com or other domains. Direct Send requires port 25. This is a Microsoft requirement.</p> <p>To configure, you only need to find out the MX DNS register for your domain and setup it in your application settings.</p> <p>You can find it using powershell:<br> </p> <pre class="code codeBlock" spellcheck="false" tabindex="0">PS> Resolve-DnsName -Name unitrends<em>.</em>com -Type MX Name Type TTL Section NameExchange Preference ---- ---- --- ------- ------------ ---------- unitrends<em>.</em>com MX 9 Answer unitrends-com<em>.</em>mail<em>.</em>protection<em>.</em>outlook<em>.</em>com 0</pre> <p>In this scenario to send alerts to our <a href="https://kaseya.vanillacommunities.com/profile/unitrends" rel="nofollow">@unitrends</a><em>.</em>com user mailboxes we just need to configure unitrends-com<em>.</em>mail<em>.</em>protection<em>.</em>outlook<em>.</em>com as SMTP.</p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/Z86KFS7RCCA3/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000nchz." alt="Email Settings Tab" class="embedImage-img importedEmbed-img"></img></p> <p>And that is all! Now you should be able to receive notifications in your Office365 mailboxes from your appliance or applications.<br> </p> <h2 data-id="smtp-relay">SMTP Relay</h2> <p>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.</p> <ol><li> 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: <pre class="code codeBlock" spellcheck="false" tabindex="0">[root@ueb08 ~]# curl -s icanhazip<em>.</em>com 37.134.134.124 [root@ueb08 ~]# curl -s curlmyip<em>.</em>com 37.134.134.124 [root@ueb08 ~]# curl wgetip<em>.</em>com 37.134.134.124 [root@ueb08 ~]# curl -s wgetip<em>.</em>com 37.134.134.124</pre> </li> <li>Login to Office365 Exchange Admin Center</li> <li>Select Mail Flow -> Connectors</li> <li>Add new connector<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/TOX709S1AYIQ/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000nche." alt="Office365 Exchange Admin Center" class="embedImage-img importedEmbed-img"></img></li> <li>Select from ” Your Organization to Office365″<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/UCCKKDU3H9NJ/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000ncho." alt="New Connector" class="embedImage-img importedEmbed-img"></img></li> <li>Give a name to the connector<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/5TSL99WCNB9T/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000ncht." alt="New Connector" class="embedImage-img importedEmbed-img"></img></li> <li>Select identify by verifying IP address and enter your public IP Address.<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/JW7QBDHGBP81/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000nchy." alt="New Connector" class="embedImage-img importedEmbed-img"></img></li> <li>Save<br><img src="https://us.v-cdn.net/6032361/uploads/migrated/2KGLDHZEEJ72/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000nci3." alt="New Connector" class="embedImage-img importedEmbed-img"></img></li> </ol><p>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.</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">PS> Resolve-DnsName -Name unitrends<em>.</em>com -Type MX </pre> <p><strong>SMTP Server:</strong> unitrends-com<em>.</em>mail<em>.</em>protection<em>.</em>outlook<em>.</em>com</p> <p><img src="https://us.v-cdn.net/6032361/uploads/migrated/W5AFFYTIMXSK/eid-ka01w000000th3g-feoid-00n40000003czqx-refid-0em40000000nci8." alt="Email Settings Tab" class="embedImage-img importedEmbed-img"></img></p> <h2 data-id="check-spam-databases">Check Spam Databases</h2> <p>Office365 will block email if your IP address is blacklisted in a spam database.</p> <p>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.</p> <p>You can use <a href="/home/leaving?allowTrusted=1&target=http%3A%2F%2Fmxtoolbox.com%2Fblacklists.aspx" rel="noopener nofollow">mxtoolbox.com/blacklists.aspx</a> website to check if your IP is listed and request removal.</p> <h2 data-id="notes"><strong>NOTES</strong></h2> <p>SEE ALSO <a href="https://kaseya.vanillacommunities.com/kb/articles/aliases/unitrends/hc/en-us/articles/360013149717?q=SELECT+ArticleNumber%2CId%2CSummary%2CResolution__c%2CAttachment__Body__s%2CCause__c%2CNotes__c%2CAttachment__ContentType__s%2CAttachment__Length__s%2CAttachment__Name__s%2CTitle%2CKnowledgeArticleId%2CDescription__c+from+Article__kav+where+PublishStatus%3D%27Online%27" rel="noopener nofollow">How do I change the sendmail 'from' address and domain on the appliance emails?</a><br> </p> </article> </main>