woensdag 11 februari 2009

Making POP3 & SMTP Server work with windows server 2008

Not so long ago we switched our sharepoint development environments from windows server 2003 to windows server 2008. Everything is working very smooth until we need to start sending and receiving e-mail.

*Shock* No more POP3 available OOTB in 2008. Microsoft has stopped shipping this product with the 2008 version, so the POP service has only been around for one version of windows server. The reason I believe was that it is not necessary for server environments as there are better options available for processing mail etc.

Now a POP3 server is something I need to be able to keep my VPC lightweight (no exchange needed), but still be able to test mail sending (like alerts) locally. Lucky for us the Hannes Preishuber has made an extension for windows server 2008 that makes this possible for us.

http://weblogs.asp.net/hpreishuber/archive/2008/04/30/visendo-smtp-pop3-extender-for-windows-2008-server.aspx

Now how do Install this? There is a small installation procedure available at that blogpost, but for me – being not so experienced in that area – it took a while to get up and running decently.
I will write down the steps I took to get it working here:

 

A) Installing the SMTP feature that is available (optionally) in win2k8 server

  1. Open up your “Server Manager” and go to “Features”
    image
  2. Click on “Add Features”
    image
  3. Select “SMTP Feature” (Already installed in my next screenshot)
    image
  4. Click install and follow the steps (this might take a while)
  5. To manage your SMTP Server you can go to IIS 6.0
  6. Make sure it is started
    image

If you encounter problems later like “Unable to relay” you can fix this by going to IIS6.0

  1. Go to the properties of your SMTP Virtual Server
    image
  2. Go to Access > Relay…
    image
  3. Select “All except the list below”
    image

 

B) Installing the POP3 Extender from Visendo

  1. Install the installer found here: http://weblogs.asp.net/hpreishuber/archive/2008/04/30/visendo-smtp-pop3-extender-for-windows-2008-server.aspx
    - note: next steps are copied from the blogpost above, I’ll just add some comments between the lines
  2. Move "visendosmtpextender_sample.config" from "C:\Program Files\ppedv\visendosmtpextender" to "C:\Documents and Settings\All Users\Application Data\ppedv\visendosmtpextender"
    - To easily get to this path just copy it and paste it in Start > Run. Otherwise if you go looking for c:\documents and settings (or just type this in) you might get an Access Denied error
  3. Rename to "visendosmtpextender_sample.config" to "visendosmtpextender.config"
  4. Edit "visendosmtpextender.config"
    - To give you an idea, my config looks like this:
    image 
    This will create a mailbox for
    administrator@moss.localhost, adjust to your own needs
  5. Start service "Visendo SMTP Extender Service 2008"
    image

C) Configuring outlook

  1. Go to Tools > Account Settings
    image
  2. Create a new account
    image
  3. Select manually configure server settings or additional server types > Next > Internet E-mail > Next
    image
  4. Fill in the following settings
    image
    - Note: I have set my IP to 192.168.1.1 because that’s the way I set it in my VPC
  5. Test your settings by clicking “Test Settings”
    image 
    Everything should complete correctly

 

Possible issues:

- Your mails are staying put in c:/inetpub/mailroot/queue
Solution: Define aliases for your hostnames in IIS6.0 SMTP Virtual Server like this:
image

I hope this helps someone. Leave a message if I missed something or if you think something could be done better.

Have a nice day,

Jeroen