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

December 6, 2008 by lucas
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.

SMTP Server Console (Properties)

Select the delivery options

 

SMTP Outbound Security Configuration

SMTP Outbound Security ConfigurationSMTP Advanced Delivery (Configuration)

SMTP Outbound Connections

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>
To:<yourtestemailaccount> �
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.

Mail Drop folder for testing

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!

 

Comments

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

    [...] on setting up W2K8 to act as a relay to gmail, etc.  Pretty interesting article.   http://www.codingbliss.com/cb/?p=38 ; I know this has been a pain point for many people and there’s not alot of information out [...]

  1. questr on Thu, 18th Jun 2009 8:03 pm
  2. Thank you, thank you, thank you! I needed some help tonight to get this setup and your instructions solved my problem!

  3. Дегтярев on Tue, 27th Apr 2010 6:14 am
  4. Успокойтесь!

  5. yurikus on Wed, 28th Apr 2010 11:37 am
  6. For WS2003 you must put smtp.gmail.com in “smart host” edit box under advanced

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!