A A A Font Size

helloitsliam

MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

If like me you have worked with quite a few SharePoint installs, probably at some point you will have configured incoming email. It works well and relies on the following:

  1. SMTP Server installed on MOSS Server
  2. Targeted Drop Folder for SharePoint to Monitor
  3. Routable email addresses
  4. Specific email aliases for the lists or libraries

One thing I had always wondered was how come you could only use a single domain. The configuration below shows what I mean:

The reason for this was what happened if you were in a hosted environment with multiple site collections you could only enable incoming email for one domain when in fact you would want to use multiple. Now this could be achieve by using exchange etc and routing them to the single domain alias that the SMTP Server on MOSS uses.

After some investigation by me and a colleague (Willie) it became evident that the process within MOSS for incoming email did not check the actual domain part. So if your email address is the following:

mylibrary@mosserver.domain.com

The incoming process in MOSS only reads the "mylibrary" part. It is the SMTP Server that is checking the domain. The MOSS part is purely reading the files as they hit the drop folder and then checking which library to send it to. So with this being case I did some further investigation and managed to build the system so I could route the following email addresses to the same library:

0605091@win2k8x64.labs.local

0605091@domain1.com

0605091@domain2.com

 

So to configure this I did the following:

Firstly I needed to ensure that SMTP Server was installed on the MOSS Server. To begin with my server has six IP address:

192.168.1.130 = Default SMTP Server

192.168.1.131 = Domain 1 SMTP Server (Creating now)

192.168.1.132 = Domain 2 SMTP Server (Creating now)

192.168.1.133 = Not used

192.168.1.134 = Not used

192.168.1.135 = Not used

 

From the IIS6 Compatibility Internet Services Manager I was able to check the default SMTP server was running on the following IP address over port 25.

We now needed to create a new SMTP Server for each domain that we wish to use. Simply right click and select "New >> SMTP Virtual Server".

We need to select one of the IP Addresses added to the server for each virtual server; in this case we used the following:

The key is next, we need to set the drop folder to the same as the default one that SharePoint is configured to read from:

Next add the domain you need:

Now we needed to repeat the process for each of the domains I was testing. Below is a shot of IIS Manager after they were configured:

To make my life easier I installed the Telnet Client on my Windows 2008 Server and connected to each SMTP Server IP Address and ran normal SMTP Commands to create an email from the same address test@mail.com, and then sent it to the above addresses:

Once the emails were created in the telnet client they were then added to the drop folder.

As you can see with the following screenshots, each email clearly has a different "x-reciever" address which matches our addresses we wish tom test.

After a while you should then see the drop folder empty as the SharePoint Timer job runs and moves the emails. The mails should then appear in the specified library. Notice they all appear irrelevant of the domain being used. The only common thing is the list/library alias of 0605091.

To prove they are the right emails each body of the email was set with a different message saying which domain it came from. If we now open each one you should now see the following:

So as you can see SharePoint does support multiple domains for Incoming emails even if the user interface within Central Administration and the list / library settings do not allow it. In a real world environment you still may use something like Exchange to receive the initial emails and then route to where you need them within the SMTP Server on MOSS. All in all this gives us a lot of flexibility for using incoming email within MOSS 2007. J

You must sign in to rate content.
(2 ratings)

Comments

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

One thing to keep in mind is SharePoint will not let you set the incoming alias to something that has already been used, and it seems this is scoped at the farm level.  This means that you can have multiple domains but you can only use an alias one time regardless of the domain.  Basically, you can only have one libarary enabled with the alias of "docs" etc.  SharePoint will save the rest of the values but will notify you that the incoming email alias is already in use.
William Rust at 5/11/2009 9:17 AM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

Good to see you commenting Willie. That is correct, the idea behind this would be let's say you were a company with multiple domain names for your business. You wanted to allow people to email documents etc into your businesses and then have all the attachements appear in a single location within SharePoint. Without the configuration shown above you would not be able to use the multiple domain approach. You could only have one domain, however you could use multiple aliases, then custom code / workflows to move the doucments to where you wanted them to be. With this approach all documents would be accepted into a single library no matter which email domain they used.

The most important key here to note is that there is no user interface within SharePoint to allow for multiple domains to be used at all. This would need to be custom coded. :-)
System Account at 5/14/2009 7:06 AM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

This is HUGE, thanks!
Sean Bordner at 5/9/2009 6:39 PM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

This is HUGE, thanks!
Sean Bordner at 5/9/2009 6:39 PM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

Good to see you commenting Willie. That is correct, the idea behind this would be let's say you were a company with multiple domain names for your business. You wanted to allow people to email documents etc into your businesses and then have all the attachements appear in a single location within SharePoint. Without the configuration shown above you would not be able to use the multiple domain approach. You could only have one domain, however you could use multiple aliases, then custom code / workflows to move the doucments to where you wanted them to be. With this approach all documents would be accepted into a single library no matter which email domain they used.

The most important key here to note is that there is no user interface within SharePoint to allow for multiple domains to be used at all. This would need to be custom coded. :-)
System Account at 5/14/2009 7:06 AM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

One thing to keep in mind is SharePoint will not let you set the incoming alias to something that has already been used, and it seems this is scoped at the farm level.  This means that you can have multiple domains but you can only use an alias one time regardless of the domain.  Basically, you can only have one libarary enabled with the alias of "docs" etc.  SharePoint will save the rest of the values but will notify you that the incoming email alias is already in use.
William Rust at 5/11/2009 9:17 AM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

This is HUGE, thanks!
Sean Bordner at 5/9/2009 6:39 PM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

One thing to keep in mind is SharePoint will not let you set the incoming alias to something that has already been used, and it seems this is scoped at the farm level.  This means that you can have multiple domains but you can only use an alias one time regardless of the domain.  Basically, you can only have one libarary enabled with the alias of "docs" etc.  SharePoint will save the rest of the values but will notify you that the incoming email alias is already in use.
William Rust at 5/11/2009 9:17 AM
You must sign in to rate content.
(Unrated)

RE: MOSS2007 - Incoming Email (Multi SMTP Domain Configuration)

Good to see you commenting Willie. That is correct, the idea behind this would be let's say you were a company with multiple domain names for your business. You wanted to allow people to email documents etc into your businesses and then have all the attachements appear in a single location within SharePoint. Without the configuration shown above you would not be able to use the multiple domain approach. You could only have one domain, however you could use multiple aliases, then custom code / workflows to move the doucments to where you wanted them to be. With this approach all documents would be accepted into a single library no matter which email domain they used.

The most important key here to note is that there is no user interface within SharePoint to allow for multiple domains to be used at all. This would need to be custom coded. :-)
System Account at 5/14/2009 7:06 AM
You must sign in to rate content.
(Unrated)

Leave a Comment

You must be logged in to post a comment.
Superstar
Liam Cleary
Senior Solution Architect | SharePoint MVP
SUSQTECH
Sheffield, UK
Liam is working as usual, SharePoint, SharePoint and then some more SharePoint!!

Search This Blog

 

© 2010 SusQtech. All rights reserved.
Powered by SharePoint Server 2007 and using the MemberToMember SharePoint Add-On for social media capabilities.