Export (0) Print
Expand All
7 out of 7 rated this helpful - Rate this topic

Using Mail Protection with Exchange EdgeSync on Forefront TMG

Published: November 2009

Author:
Alex Zvansky - Program Manager, Microsoft Forefront Edge Team

Technical Reviewers:
Yuri Diogenes - Sr Security Support Escalation Engineer, Microsoft CSS Forefront Edge Team
Jim Harrison - Program Manager, FF Edge CS
Eran Shany - Sr Software Development Engineer

Editor:
Meir Feinberg - Technical Writer

Introduction

Forefront TMG enables you to protect your organization from spam, viruses and other e-mail-based threats. It does this by leveraging the mail protection provided by Microsoft Forefront Protection 2010 for Exchange Server and by utilizing the end-to-end mail relay service provided by the Exchange Edge Transport Server. In Forefront TMG we're introducing support for Exchange Edge Subscription - also called EdgeSync. This blog will walk you through the setup of Forefront TMG with E-Mail Protection and creating the Edge Subscription to your Exchange Organization.

Installation

  1. First you need to make sure that the Forefront TMG Server has a Fully Qualified Domain Name (FQDN). This is required by the Exchange Edge Role:


    Ee513174.737de2fc-9597-4674-a505-11fe21c32d9e(en-us,TechNet.10).jpg


    If there is no primary domain suffix defined, define a suffix for your organization, apply settings and restart.

  2. Install the Active Directory Lightweight Directory Service by running the following command from an elevated command prompt:

    cmd.exe /c start /w pkgmgr.exe /iu:"DirectoryServices-ADAM"

  3. Install Exchange 2007 SP1 or SP2; choose Custom Installation -> Edge Transport Server Role. It is recommended to restart the server after the Exchange installation is finished.

  4. On the Forefront TMG DVD, open autorun.hta.

    Install Microsoft Forefront Protection 2010 for Exchange Server

  5. Run the Preparation Tool and then install Forefront TMG.

  6. Go through the Getting Started wizard and Web Access wizard if needed.

Configuring E-Mail policy

Now we are ready to configure E-Mail policy on Forefront TMG.

  1. Click on Configure Server to Server Mail Protection on the E-Mail Policy node. This will start the E-Mail policy wizard.

  2. On the Internal Mail Server Configuration page you should specify all the Exchange hub servers that you want to forward incoming mail to. You also need to specify for which domains e-mail is accepted and forwarded to the hub servers.

  3. For the Internal E-Mail Listener choose the Internal network. You can also specify which IP to listen on if multiple IPs are available.

  4. For the External E-Mail Listener choose to listen on the External network. For example, specify mail.contoso.com as the FQDN that will be presented in HELO and EHLO commands.

  5. Enable Anti-Spam, Virus and Content filtering.

  6. When the wizard is finished, Forefront TMG proposes that you enable System policy rules to allow SMTP traffic in and out of the Forefront TMG server. Click Yes and then Apply the settings. Check Alerts for errors in applying the E-Mail policy.

Setting Up Edge Subscription

  1. On the E-Mail Policy tab click on Enable Edge Subscription Service. You are asked to approve more System policy rules for EdgeSync traffic. Apply settings.

  2. Now click on Generate Edge Subscription Files and save the files to a folder. If you do it for an array, a subscription file will be created for each array member.

  3. On the Exchange hub server open the Exchange Management Console. Navigate to Organization Configuration -> Hub transport. Click on New Edge Subscription, choose the file generated by Forefront TMG and create the subscription. Repeat this for each array member.

  4. Make sure that FQDNs for all Forefront TMG servers are resolvable via internal DNS.

Let's check that synchronization worked:

  1. Open the Exchange Management Shell on the Forefront TMG machine and run the Get-SendConnector command. You should see at least two send connectors created.


    Ee513174.1dcd9848-e1f5-4e81-9340-2c4eec2d8784(en-us,TechNet.10).jpg


  2. If you don't see send connectors you can force synchronization by running Start-EdgeSynchronization on your hub server.

There is one more thing to do before we are ready to test mail delivery. We need to check that the authentication settings on the Receive Connectors are correct.

  • On the Exchange hub server, navigate to Server Configuration -> Hub Transport, right click on the Default Receive Connector and select Properties. On the Authentication tab, verify that TLS and Exchange Server authentication are selected.


    Ee513174.368229b1-d044-4a04-b027-31d2dc0881ff(en-us,TechNet.10).jpg


  • On the Forefront TMG server, navigate to E-Mail Policy, right click on the Internal_Mail_Servers route and select Properties. On the Listener tab, click Authentication Settings and verify that only TLS and Exchange Server Authentication are selected.


    Ee513174.f403746d-eab6-4e67-ac05-af1da9acfbba(en-us,TechNet.10).jpg


Configuring Anti-Malware scanning and Content filtering

Now we can configure Antivirus scanning and other filtering settings. In this example I will enable a few antivirus engines and configure the blocking of EXE files.

On the Forefront TMG server, navigate to the Virus and Content Filtering tab and:

  1. Enable the Antivirus and then click Select AV Engines on the Tasks Pane. Select one or more engines from the list.


    Ee513174.1a70f284-36d2-4103-9554-f445a042b5a2(en-us,TechNet.10).jpg


  2. Click on the Enabled link under File Filtering. On the File Filters tab, click Add and then on the General tab fill in Block executables as the Filter name. You can apply the filter to inbound and/or outbound messages.


    Ee513174.e4797b50-d192-48a4-aa3b-208ccea5bad5(en-us,TechNet.10).jpg


    On the File Types tab select Microsoft Windows Executable. Apply the settings and wait until Forefront TMG reloads the settings.

Testing mail flow and content filtering

It's time to test that our settings are working. But first we want to verify that E-Mail antivirus signatures were updated from the Internet. On the Forefront TMG server, navigate to the Update Center and select E-Mail Antivirus. The status should be green, with more details about each engine in the bottom pane.

Ee513174.0161f311-a059-41bb-9695-583c25599142(en-us,TechNet.10).jpg


I will use OWA on the internal network to send mail from the Exchange Organization to the External SMTP server. I also have the External client with Outlook configured with POP3 and SMTP to send mails back to the Internal Exchange.

  1. First I send a test mail from OWA to a dummy external address test1@intenet.com. I can retrieve the message from the External client.


    Ee513174.f0c862f0-b4d6-49fc-9aa5-dcb38d01483b(en-us,TechNet.10).jpg


  2. Now I will try to reply to this e-mail with the notepad.exe executable file. As you can see, the executable file was blocked by the filter.


    Ee513174.c38d0037-a2b7-4bbf-894a-69a42cfa9833(en-us,TechNet.10).jpg


  3. Now I will try to reply to the same mail with a zipped EICAR test virus attached (http://www.eicar.org). Same result, the file was filtered by the antivirus engine.


    Ee513174.3b9d97d4-36ef-4671-bff8-11ee07c67ef0(en-us,TechNet.10).jpg


One last note about troubleshooting

In such a complex environment sometimes it's hard to troubleshoot problems. I want to give a few tips on how to troubleshoot mail flow through Forefront TMG E-Mail protection.

  1. Use the Forefront TMG log. Build a query for SMTP traffic only and monitor SMTP connections live.


    Ee513174.629cc5c2-1d96-41ce-8876-e2948da0c1da(en-us,TechNet.10).jpg


  2. Use Exchange troubleshooting tools like Mail Flow Troubleshooter, Message Tracking and Queue Viewer via Exchange Management console both on Forefront TMG and on the Hub server.

  3. When a message is stuck in the queue and you cannot figure out why, you can use SMTP protocol logging. Configure the Receive Connectors via the Exchange Management console on the Forefront TMG server. Forefront TMG will not override this setting. Configure the Send connectors via the Exchange Management console on the hub server and push via Synchronization.

    In this example we will configure logging for Send Connectors:

    1. Open the Exchange Management Console, navigate to Organization Configuration -> Hub Transport. On the Send Connectors tab, right click on Send Connector and click properties. Select Verbose as the Protocol logging level.


      Ee513174.0994220f-2672-40a8-b73a-c9b1fd682a60(en-us,TechNet.10).jpg


    2. Repeat for all connectors.

    3. Open the Exchange Management Shell and run the Start-EdgeSynchronization commandlet

      The log can be found in the %ProgramFiles%\Microsoft\Exchange Server\TransportRoles\Logs\ProtocolLog\SmtoSend and SmptRecive folders

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.