Join Now!
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:
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
Posted on 5/9/2009 at 5:09 AM Permalink | Share This Post | Comments (3) | Leave a Comment
Blog Tags:
Community Tags:
All Blogs
Administration Coding CQWP Download Email How To iPhone Metadata Services MOSS 2007 MOSS Search My Sites Records Management REST Services Search SEO Service Packs SharePoint SharePoint 2010 Toolkit Updates User Experience WCF Web XML