Does SharePoint 2019 still need the SMTP Service?
Summary
Now that SharePoint 2019 public preview has been released, the official deprecated / removed list has been published. After reading this you may have noticed that "Incoming email automatic mode" has been removed from the product.
Incoming email automatic mode
As announced by the Windows Server team, Microsoft is deprecating the IIS 6 Management compatibility features in Internet Information Services (IIS). The automatic mode of the SharePoint incoming email feature relies on IIS 6 APIs to manage the IIS SMTP service. Because no alternative APIs exist to manage the IIS SMTP service, we are removing support for automatic mode in the incoming email feature of SharePoint Server 2019 Public Preview. Customers using incoming email are recommended to use advanced mode instead, which allows you to manually manage the IIS SMTP service and drop folder.
Also, you may have seen my blog detailing the changes in SharePoint 2019 stating that the SMTP Authentication is now supported and we longer need a local SMTP server to support anonymous authentication.
Lastly, the SMTP Service has been added to the deprecation list since Windows 2012 server.
SMTP
SMTP and the associated management tools are deprecated. Though the functionality is still available in Windows Server 2012, you should begin using System.Net.Smtp. With this API, you will not be able to insert a message into a file for pickup; instead configure Web applications to connect on port 25 to another server using SMTP.
So, what does this all mean?
SharePoint no longer "requires" a local SMTP service. SharePoint can still utilize the service to process incoming e-mail from the drop folder. However, it's not really "required".
Incoming e-mail with advanced mode gives you a simple input "E-mail drop folder".
Example:
When configuring advanced mode, Admin's must enter the drop folder location manually. Since the SharePoint Farm Service Account (the account running the timer service) only needs access to e-mail from a drop location, it can be local or remote file path that contains the incoming e-mail destined for the SharePoint Farm.
Example:
Wrapping it all up
When the time comes, and the SMTP service is removed from Windows, customers will need a method to route e-mail destined for Sharepoint to a Windows folder to process incoming e-mail. However, customers that still have an on-premises Exchange Server, a "Foreign Connector" can be used to route mail destined for SharePoint to a drop folder. Otherwise, a 3rd party solution may be required.
Let's See the "Foreign Connector" solution in action!
1. Create a new connector in Exchange and specify correct address space to match the SharePoint Farm configuration.
Example:
New-ForeignConnector -Name "SharePoint Email" -AddressSpaces "SMTP:sp2019.net" -SourceTransportServers "exch-server"
New-ForeignConnector
/en-us/powershell/module/exchange/mail-flow/new-foreignconnector?view=exchange-ps
2. Set the new connector to the desired drop location.
Example:
Set-ForeignConnector "SharePoint Email" -DropDirectory "C:\Program Files\Microsoft\Exchange Server\V15\SharePoint"
Set-ForeignConnector
/en-us/powershell/module/exchange/mail-flow/set-foreignconnector?view=exchange-ps
3. Create the folder in the specified location.
4. Share the folder and edit the permissions to ensure that Exchange and the SharePoint Timer Service Account has full permissions.
Note: I gave "everyone" full control at the folder level, but the SharePoint Service account full control at the sharing level.
5. Now configure SharePoint to use the correct address space and drop location.
6. Configure a document library to receive mail.
7. Now test it by sending a message from Outlook.
8. The e-mail should be delivered to the drop location, where SharePoint will process it when the incoming e-mail timer job is executed.
9. Success! The message was processed and delivered to the SharePoint Library
Let's Recap
SharePoint 2019 will only support "Advanced Mode" to configure incoming e-mail.
SMTP Service is deprecated but still currently included with the latest version of Windows Server.
Note: When products are deprecated, they can be removed at any time. So be ready.
SharePoint does not require a local SMTP Server, only a drop location to process incoming email.
An on-prem Exchange Server can utilize a "Foreign Connector" to route e-mail per address space to a drop location.
Setting this up in a lab was a lot of fun. If you don't agree try it :) .