Skip to content

Integrating SharePoint On Premises With BPOS and Exchange Online: Part 2 – Inbound

A few weeks ago I posted an article on how to get on premises SharePoint working with BPOS for mail delivery (alerts, etc.). Historically, inbound email is something that is significantly trickier than outbound, but with hosted Exchange, I’d suggest that the two roles are switched in terms of difficulty. There are however still a couple of extra hoops that have to be jumped through, and I’ll try to guide you through them here.

Firstly, allow me to say that SharePointGeorge has an excellent article out there on setting up incoming email when everything is on premises. In addition, BPOS Tutor had an article on using distribution lists that I was able to make use of while preparing this.

1. Set Up the SMTP service

For the purposes of this article, I’m going to assume that you’ve already done this when you set up outgoing mail. If not, I’ll refer you to my article linked above, or SharePoint George that will walk you through the requisite steps. Once it’s done for outgoing email, you don’t need to touch it for incoming.

2. Configure the SharePoint Farm to Accept Incoming email

First,you’ll need to navigate to Central Administration,and get into the System Settings section. Once there, select “Configure incoming e-mail settings” in the E-Mail and Text Messages section.

image

There are a number of settings here that will change a bit from what is the typical guidance out there. I’ll try to explain each configuration item, and what it means. Firstly, I’ll show you a completed configuration:

image

Enable Incoming E-Mail – Well, that’s pretty straightforward, do I turn on incoming email or not? When you turn it on, SharePoint simply monitors an SMTP drop folder for any messages. If it sees one, it will pick it up, and if the destination name matches a list, it will get delivered. It’s really that simple.

The settings mode lets you choose where the drop folder is. The Automatic setting is normally fine, but if you wanted to use a drop folder in a non default location, or on another server, you would select advanced and enter the desired folder. When the configuration is saved, SharePoint will also try to set the appropriate file system rights on that folder (see George’s blog for more details). I set advanced just so I see the path explicitly.

Directory Management Service – This one normally takes a fair bit of configuration to get working, but when we’re using BPOS, it’s easy – we just set it to no. This is a service that sets up contacts and distribution groups in Exchange, and although we’re using Exchange, it’s hosted, and don’t have access to that feature. We will be creating these manually.

Incoming E-Mail Server Display Address – This is the domain that the list email addresses will use. We’re going to change this. It will default to servername.domain.com. However, even if that address is available externally, we don’t want to be accepting mail from everyone. The IIS SMTP service has no real spam or virus protection, so we want all of our email to go through our hosted Exchange server. The best approach is to use the same domain as your other BPOS users.

E-Mail Drop Folder – As mentioned above, this is the folder that will be monitored for incoming email. If you don’t know if you should change this, then don’t… the default is likely fine.

Once you’re done, click OK to save the configuration. SharePoint is now set up to configure incoming email. Steps 3 and 4 will need to be repeated for every list/library that will accept email.

3. Configure Library to Accept Incoming E-Mail

Navigate to a library that you want to have accept incoming email. From the ribbon, select “Library” (or List..), and then select Library Settings.

image 

Next, under the Communications Column, click the “Incoming e-mail settings” link. You should see a screen similar to the following:

image

Most of the options are self explanatory, so I won’t go into detail here. The most important ones are of course in the Incoming E-Mail section, which lets you turn it on or off, and lets you specify the address of the list. The address is important, as it will need to match what we do in BPOS in step 4, and it is also important that it is global across the farm (and of course the domain). That name can’t be repeated, so choose wisely. A naming policy is a good idea here.

Once you have the settings the way you want them, click OK, and your list is ready to go. Now it’s on to BPOS.

4. Configure the Address in BPOS

This is where it gets interesting. What we want to do is to have BPOS accept email from internal (and possibly external) senders, and then turn around and deliver them to out IIS SMTP service. Usually, we could set up a contact in Exchange and use mail forwarding to do this for us, but there is no mail forwarding capability in BPOS. So how do we accomplish this? Instead of using mail forwarding, we’ll set up a distribution list with one member, and let it work its magic that way.

The first thing that we need to do is to log into the admin portal at http://admin.microsoftonline.com. Once in click on the Service Settings tab, and then click on the Exchange Online subtab. From the right hand Actions section, click the “Add new contact” link. You then need to add your contact, which in effect is the library that we enabled in 3 previously:

image

Most of the fields are cosmetic (they will appear in the GAL), but the most important one for our purposes is the E-Mail address. note that this address is NOT the same as the one that we configured for the list, but includes the server name as well. This is important as BPOS needs to deliver the mail to that server. It is also important that that server address is available to BPOS (on a public DNS). This represents one half of the equation. In the next step, we’ll configure BPOS to accept the email for the list’s address by using a distribution list.

Once ready, Save your changes, and then click on the Distribution Lists link on the left of the screen. From the Actions section on the right, click “New distribution list”.

image

The Email Alias used here must match the one used in 3 above, and. The display name is relatively unimportant, but again will be available to the GAL. Once you save this screen, you should be ready to go.

It’s worthwhile to describe the flow of what happens. When an email is sent from a user, external or internal, the originating server will look for an MX record for the address to the right of the @ symbol. That MX record will point to your BPOS server. The BPOS server will accept the name, as it matches the distribution list that you created in step 4. The message will then be distributed to the members of the list, in this case one member at the precise SMTP address of the server farm. BPOS will send the message to the SMTP server running on the farm, where it will be deposited to the drop folder. Finally, the timer process in SharePoint will pick up the message and deposit it into the appropriate library.

Nothing to it…. Smile

16 Comments

  1. Markus Markus

    For some reason i can””t get this to work… Does IIS7 smtp need to be configured any and i also get this error in my logs No usable TLS server certificate for SMTP virtual server instance ””1”” could be found. TLS will be disabled for this virtual-server.”

    Great article.

    Cheers,
    Markus

  2. Anonymous Anonymous

    Will this tutorial work, If you use an external smtp server for your outgoing emails (ISP Smtp server)

  3. Yes it should. The advantage of using the SMTP service is that it effectively “emulates” a client sending the email.

  4. Michael Suyama Michael Suyama

    Do you know if any of this changes when integrating with the Exchange online in Office 365? Are there any options to use Office 365 Exchange directly?

  5. John White John White

    It should work exactly the same way with 365. That said, I haven’t tried it myself yet….

  6. Steve Trickey Steve Trickey

    I’ve setup incoming email based on the default server address, but this only works if I also allow the list to receive messages from any sender (not something I want to do) – trying to restrict based on list permissions doesn’t work. I can’t see how, but would routing in via the BPOS server overcome this?

  7. Is your O365 setup to use ADFS integration to your company domain? Most times the list for on premise environments will put an entry in AD. Then you set the routing tables in Exchange. I have not tried this yet but did not know you could if they did not have the ability to talk. Being O365 does not see my main domain?

  8. Simon Pritchard Simon Pritchard

    Hi,

    Your part 1 was REALLY helpful and has got us up and running.

    In this part however, we’re stuck at the point of adding the new distribution list. We’ve created this, but there’s no information above as to what the membership should look like. You’ve mentioned that it should have only one member, but have not explicitly described this. Is there a screenshot that you originally provided that doesn’t load on this page? We think that’s the only piece of this puzzle that we’re missing!!

    Thanks in advance

  9. Hey Simon. You’re right, I should have been more clear. The member that goes into the distribution list should be the email address of the library in question. Essentially, each library will get a distribution list.

    One caveat – this is a VERY old post – I haven’t done this with Office 365, so I can’t verify how well it works, or if all of it even remains necessary. However, on first blush, I don’t see any reason that it wouldn’t work….

  10. Gavin Thomas Gavin Thomas

    Hi John

    I have setup a distribution list called test@company.com on our Office 365 system. I then created an Office 365 mailbox called sharepoint-test@company.com which is a member of the distribution group. I am confused at how Office 365 is going to send the message to the SMTP server on our SharePoint server without setting up some kind of mail flow connector?

  11. David David

    I’m with Simon…there’s an integral piece missing. What does the setup look like for the DL? What does the setup look like for the mail contact? They can’t both be the same. You say the DL should have the same email address as the SP library as configured in #3. The DL member (mail contact) can’t have the same email address. Exchange Online is smarter than that and won’t allow this. The email addresses must be unique. How does Exchange Online know how to deliver email to Sharepoint??
    Thank you

  12. Hey David/Simon – This article is very old – it was written for BPOS originally. With that said, the principles should still be valid, although I haven’t had need to test them out. As for the DL, it needs to CONTAIN the SP library address, not be the same, if I remember correctly.

  13. Kong Kong

    Thank you for this blog, John. It’s unfortunate and very frustrating I can’t find a clear cut way to do this for 0365. Setting up an Outbound mail flow connector seems like the right choice in Exchange 0365.

  14. Did anyone ever figure this out? I’m at the same point – guessing that I need maybe an outbound connector… would like to clarify with someone who got this working. I’m O365 and Onpremis SharePoint 2010. I created a DL with the destination email and created a contact with an email that matches the library and put the contact in the DL. HELP!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.