SharePoint 2010 can process inbound email
messages and accept them and their attachments as content for SharePoint
document libraries, lists, and discussion groups. Indeed, SharePoint
technically does not require the use of Exchange for this component, as
it utilizes its own SMTP virtual server that it can use to accept email
from any SMTP server, including non-Exchange boxes.
Integration with
Exchange, however, has significant advantages for SharePoint. Most
notably, new email-enabled content within SharePoint can be configured
to have contacts within Exchange automatically created within a specific
organizational unit (OU) in Active Directory. This makes it so that
email administrators don’t need to maintain the email addresses
associated with each SharePoint list or document library in the farm.
Installing the SMTP Server Service on the SharePoint Server
The first step to setting up
a SharePoint server as an inbound email platform is to install the SMTP
Server service on the SharePoint server. Typically, this service is
installed on the server or servers running the web role. To install the
SMTP Server Service on the server, perform the following steps (these
steps assume Windows Server 2008 R2):
1. | Open Server Manager (Start, All Programs, Administrative Tools, Server Manager).
| 2. | Under the Features node, click Add Features.
| 3. | Click the check box for SMTP Server.
| 4. | From the dialog box shown in Figure 1, choose to add the required role services.
| 5. | Click Next to continue.
| 6. | Click Next at the Web Server intro dialog box.
| 7. | Leave the Role Services set at the defaults and click Next to continue.
| 8. | From the Confirm Installation dialog box, shown in Figure 2, click Install to install the SMTP Server feature on the server.
| 9. | Click Close when complete. Repeat for any remaining web front ends where the incoming email feature will be supported.
|
Configuring the Incoming Email Server Role on the SharePoint Server
After
the SMTP Service has been installed on the server, inbound email can be
enabled through the SharePoint Central Admin tool. Incoming email
functionality can be configured in two ways: automatic mode or advanced
mode. Automatic mode sets up inbound mail access using default settings,
whereas advanced mode allows for more complex configuration to take
place, but should only be used if the SMTP service is not used to
receive incoming email, but rather the server is configured to point to a
different SMTP server. To enable incoming email functionality in a
SharePoint farm, and configure it with the most ideal options, do the
following:
1. | Open
the SharePoint Central Administration Tool from the server console
(Start, All Programs, Microsoft SharePoint 2010 Products, SharePoint
2010 Central Administration).
| 2. | Click the System Settings link in the navigation bar.
| 3. | Under E-Mail and Text Messages (SMS), click the link Configure Incoming E-Mail Settings.
| 4. | From the Configure Incoming E-Mail Settings dialog box, shown in Figure 3, click Yes to enable sites on the server to receive email.
| 5. | Set the Settings mode to Automatic.
| 6. | Select Yes to use the SharePoint Directory Management Service.
| 7. | Enter
an Active Directory OU where the new distribution groups and contact
objects for SharePoint will be created. This OU must be created in AD in
advance, and the SharePoint service account must have rights to create
and modify objects in this OU. The OU must be listed in LDAP format (for
example, OU= SharePoint,OU= Contacts, OU= Resources,DC= companyabc,DC=
com).
| 8. | Enter
the SMTP mail server for incoming mail, which will be the SharePoint
server name in this example. If load balancing multiple incoming email
servers, enter an alias that can be used to connect to a load-balanced
VIP.
| 9. | Under
the setting for accepting messages from authenticated users only, click
Yes, so that only authenticated domain users can send email to the
server. This setting can be changed to No if you want to accept
anonymous email from the Internet into the site content.
| 10. | Scroll down in the page, and examine the settings listed in Figure 4. Check to allow the creation of distribution groups from SharePoint sites.
| 11. | Enter
a display address for the incoming email server; it should match the
domain alias of the organization. An SMTP address policy must also be
created in Exchange to match this domain name if it doesn’t already
exist.
| 12. | Finally,
configure which email servers SharePoint will accept email from. Enter
the IP address of any Exchange hub transport servers that will be
relaying mail to SharePoint. In this example, 10.10.10.103 is the IP
address of the Exchange hub transport server.
| 13. | Click OK to save the changes.
|
Using the Directory Management Service
The
Directory Management Service in SharePoint 2010 uses a timer job within
SharePoint to automate the creation of contact objects. These contacts
are automatically created to allow inbound mail to document libraries or
lists within SharePoint to be automatically enabled.
For example, when a
document library called Companyabc-doclib is created and selected to be
email-enabled, the SharePoint Directory Management Service automatically
creates a contact object in Active Directory that has a primary SMTP
address of companyabc-doclib@sp1.companyabc.com, in this example. This contact then inherits a secondary SMTP address of companyabc-doclib@companyabc.com through Exchange recipient policies. These policies need to be set up if they are not already in place.
After the contact is
automatically created, users can send email to this address and have it
flow through the Exchange server, which then forwards it to the
SharePoint server (the primary SMTP address). It is then accepted into
the SMTP virtual server on the SharePoint server, and then imported into
SharePoint via a timer job that runs on the server. In this way, all
emails sent to that address appear in the companyabc-doclib document
library.
Note
For the Directory
Management Service to work, the account that runs as the SharePoint
Central Admin application pool identity account needs to have add and
modify rights to the OU that is specified under the Incoming Email
Settings page. If this account does not have rights to the OU,
automation of these contacts will fail.
|