Office365 is a cloud-based solution which allows you to host email and SharePoint at microsoft’s servers on the cloud. And if you already use this solution and starting using the SCSM when early or later you want to send notifications to Exchange Online mailboxes. That simple at first glance solution is not really simple. The main problem that Office365 doesn’t support Windows authentication. So the only way is send all emails through your local SMTP relay. In this post I’ll talk how to setup and configure all chain to send notifications from SCSM to Office365.
Required steps
To do that you must complete next steps:
- Get the SMTP server name from Exchange Online.
- Create and configure local SMTP relay (I’m assume that you doesn’t use local Exchange Server).
- Configure the SCSM notification channel.
Before you start you must create new email account for SCSM in Office365. In my case I use the “scsmsolutions.onmicrosoft.com” domain and “scsm” account.
Getting the SMTP address from Exchange Online
To create local SMTP relay you must know the Office365 SMTP server name. You can find it on the “Settings” page of the Outlook Online. To get SMTP server name you must:
- Logon to Outlook Online with account used as SCSM notification email account
- At right top corner press “Options” –> “See All Options…”
- Then press the “Settings for POP, IMAP, and SMTP access… ”:
- Write information about SMTP server (please don’t use the server name on the picture below ‘cause in this case communication between your SMTP relay and Office365 maybe broken):
Create new SMTP relay based on “SMTP Server” feature of the Windows Server 2008 R2
To create new SMTP relay on Windows Server 2008 R2 you must:
- Run the “Server Manager” and navigate to “Features”
- Click to “Add feature”
- Check the “SMTP Server” feature (and all required) and finish the master by pressing Next->Next->Finish
- Open the “Internet Information Services (IIS) 6.0 Manager” (Start –> Administration Tools –> Internet Information Services (IIS) 6.0 Manager)
- Navigate to YOUSERVERNAME –> [SMTP Virtual Server #1], call the context menu and click to “Properties”:
- Switch to “Access” tab and click to “Authentication” button:
- Check the authentication method which you will be use in SCSM Notification Channel (or both):
- On the “Access” tab press the “Relay” button.
- Add IP address(es) of the SCSM server(s) to list (in my case SCSM server is the same server as the SMTP server):
- Switch to “Delivery” tab and press the “Outbound security” button:
- Check “Basic authentication” and enter user name (in username@domain format) of the Office365 SCSM email account and it password and check the “TLS encryption”:
- On the same “Delivery” tab press “Outbound connection” button and set “TCP Port” to 587 (see “Getting the SMTP address from Exchange Online” step 4):
- On the same tab press “Advanced” button and set the “Smart host” to name of the your Office365 SMTP server (see “Getting the SMTP address from Exchange Online” step 4) and clear the “Attempt direct delivery before sending to smart host” checkbox:
That’s all. If you leave the anonymous authentication for you local SMTP server then you can check configuration with telnet by:
- Call the cmd
- type “telnet localhost 25” and press Enter (telnet is not installed by default, check the Server Manager –> Features)
- type “HELO 127.0.0.1” and press Enter
- type “MAIL FROM: scsm@yourdomain” (scsm@yourdomain is a SCSM account email on Office365) and press Enter
- type “RCPT TO: user@yourdomain” (user@yourdomain is an any email on Office365) and press Enter
- type “DATA” and press Enter
- type any chars and press Enter
- type “.” (dote) and press Enter. You must see message “250 2.6.0 Queued mail for delivery”
- type “quit” and press Enter
Wait several minutes and check the user@yourdomain mailbox.
BTW1. This configuration allows you to send messages to any external email account (hotmail, gmail or your external corporate email server).
BTW2. You can use different smart hosts to send email on different domain. See “remote domain” on SMTP server help.
Configure the SCSM notification channel
Now you can turn on the SCSM notification channel. To do that you must:
- Open SCSM console and navigate to Administration –> Notifications –> Channels
- Select “Email Notification Channel” item and press “Properties” console task (or double click on item)
- Check “Enable e-mail notifications” and type SCSM’s account email address on Office365 on “Return e-mail address” field and then press “Add…” button
- Type your local SMTP server address and select authentication method
Known issues
First of all read the Message and Recipient Limits article, especially the “Recipient and sender limits” section. Note what each account can send 30 messages per minute. Even in my test environment some times I reach this limit. Note what after that all communication to Office365 SMTP server ends with “550 5.2.2 Submission quota exceeded” error.
11 Comments
Awesome post. One question, when you setup your relay did you use a self-signed ssl cert or did you already have on purchased?
This was demo so I’ve used non-secure SMTP.
On the SCSM Notification Channel setup do you use port 25 or port 587 that was configured on the smtp server?
Use your local SMTP server’s port
When creating the relay, do you need to do this on the Management Server or a DC?
On any server but the DC is bad idea.
Was able to successfully get setup notifications with Office 365 by following these instructions. Thank you for posting
[…] http://blog.scsmsolutions.com/2012/02/setup-notification-from-scsm-to-exchange-online-office365-mail… […]
[…] I also managed to find another post by a fellow MVP Anton Gritsenko on setting up SCSM notification using Exchange Online (Office 365) via SMTP relay: http://blog.scsmsolutions.com/2012/02/setup-notification-from-scsm-to-exchange-online-office365-mail… […]
What do you normally do after receiving the 550 5.2.2 Submission quota exceeded error. The account I was using to send emails is now giving that error and it has been more than 48 hours.
AFAIK you can open support case to increase number of messages allowed to be send.