Setting up SMTP on windows 2008 server (windows 2003) To use Gmail as SMTP host

December 6, 2008 by · 18 Comments
Filed under: Software Configuration 

This is a post about how to setup an SMTP relay on windows 2008 server(should work same on windows 2003 since Microsoft didn’t update the SMTP console) to use a different mail server like gmail, or yahoo, or any email provider which offers an SMTP feature (currently i don’t think hotmail allows this.)

Step 1: Install SMTP and the Admin UI (which is the IIS 6.0 MMC different from the new IIS 7.0 MMC)

Step 2: Run SMTP IIS 6.0 MMC as Admin (if using UAC), and configure the outbound rules

To use SMTP server as a relay to gmail you would simply set these outbound connection settings.  You need to right-click on the virtual server and select properties.

Step 3: Test it out

To test it out you can create a new text file call it “mail.txt” and put this inside “

From:<the email address your from>
Subject: testing 1 2 3
Mail content to send.”

copy this file into the mailrootpickup folder, which should automatically be sent to see if it does indeed relay directly.

So this relay will send all mail to the gmail server using your gmail account (it overwrites the from address to always be from the gmail account but it is a free smtp relay and pretty easy to accomplish. If there are any problems forwarding make sure to check the relay/authentication settings for the inbound connections and don’t leave your relay open to public it could cause spam problems and get your gmail account removed.

Warning: Service reliability and Auto restart

I have noticed that if you restart IIS the SMTP server doesn’t come back online all the time, you may need to manually open IIS 6  console and start SMTP virtual servers, I am investigating this but wanted to point out a word of warning.

Update:  Apparently when you install SMTP it doesn’t default to auto-start as a service in the services snap-in, just update this to auto-start it should then work as expected.

Happy Mailing!