Set up local SMTP service to relay e-mail to a mail server

Let’s say you’re using a virtual machine to develop SharePoint on and you need to test some mail alerts.  These instructions will show you how to set up the built-in SMTP on Windows Server 2003 so that it will accept mail and forward it to a production mail server such as a home ISP mail server or your company’s Exchange server for delivery to either another mailbox account or any other e-mail address.  This would allow a developer to enable and test e-mail notifications from SharePoint or any other application.

Follow these instructions to turn on SMTP and set it to use your current mail server as a Smart Host e-mail relay with authentication:

  1. Go into Computer Management and click to view Services.  Find “Simple Mail Transfer Protocol (SMTP)” service and verify that it is started and it’s startup type is Automatic. image
  2. Go into the IIS Manager and right-click on Default SMTP Virtual Server and click on Properties.  After the “Default SMTP Virtual Server Properties” window opens, click on the Delivery tab and then click on the Advanced button. 
    image
  3. In the “Advanced Delivery” window, click on the text box under Smart Host and enter in the FQDN of your production mail server.  Click OK. 
    image
  4. Still in the Delivery tab, click on the Outbound Security button.  In the “Outbound Security” window select the radial for Basic Authentication and put your own username and password for the server you entered in step 3 in the provided boxes.  (see the screenshot)  If it’s a Windows mail server, you will probably use the style in the screenshot.  Otherwise, you will need to check the documentation from your mail provider to see how to enter in SMTP credentials.  Click OK. 
    image
  5. Now you need to give yourself permission to relay mail through your SMTP server.  Back in the SMTP Virtual Server Properties window, click on the Access tab and then click on the Relay button.  Make sure the radial for “Only the list below” is selected and click on the Add button to add an IP that is allowed to relay.
  6. In the window that pops up, select the radial for Single computer and enter in the IP address for the loopback adapter, (127.0.0.1) .  click OK 3 times to set all of your changes. 
    image
  7. Stop and start the “Simple Mail Transfer Protocol (SMTP)” service and follow these instructions (link to Microsoft Support KB) to test your SMTP server.

Technorati Tags: , ,

This entry was posted in Microsoft Admin, SharePoint and tagged , , . Bookmark the permalink.

2 Responses to Set up local SMTP service to relay e-mail to a mail server

  1. mark says:

    Thanks, Good Post.

  2. Tom Resing says:

    An important function to test in SharePoint and many web apps. As I’m not an admin, I always need help with these kinds of things.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>