Send email from your local machine tips / tricks.

A common question that comes up in the newsgroups is how to setup your local machine to relay email.  Windows 2000 / XP / 2003, 2008 comes with the built-in SMTP service, Vista does not provide this option.  You can install another 3rd party SMTP server to make up for this.  If you are using XP / 2000 or any Server products (2000, 2003, 2008), you can configure this by simply installing and configuring the relay option.  For Vista, you’ll need to consult the 3rd party vendor you install how to configure relay options, if applicable.  Here is a couple of posts that discuss this further. and

After you have installed the SMTP service option, open IIS Manager >> Right click properties on Default SMTP Virtual Server >> Select Access Tab >> Relay option and put  Secondly, I recommend you enable logging so when you are trying to verify things are working, you can review the logs.  Here is my blog on enable logging.  The logs are located by default in c:windowssystem32logfilessmtpsvcsmtpsvc1  To verify the service is listening.  Open up a command prompt and type netstat -an -p tcp  It should show  If you see this, you know your SMTP service is active and ready.  If this isn’t listed, you didn’t install the SMTP service properly.  I would do this after following the procedure to ensure the service is active. 

The biggest hangup most people have their ISP only allows them to route a certain number of emails or blocks port 25 all together.  You’ll want to check with your ISP or test sending emails to an external address from the machine running the SMTP service.  You can use a simple telnet test locally to an an email address such as, MSN, Gmail or another free provider.  If you receive the telnet test, you know your local SMTP server is working.  If it’s stuck in the Queue or Pickup directory, there is a problem, either your local ISP doesn’t allow relaying or something else.  This is where the logs come in handy.  Another tool for verifying your config is SMTPDiag.  Here is a post with some info how to use SMTPDiag.  You may wonder why your local ISP blocks port 25, this discourages customers from setting up their own mail server to send out emails, unsolicited email or zombie machines infected with a virus or spyware. 

This is not an exact science.   A lot of people think it is really hard to configure the mail server, it isn’t the too bad.  It is understanding there are external factors like the ISP not allowing the operation in the first place or DNS not configured properly.  The DNS is another common mis-configuration, but if your machine is connected to the internet through a router or other machines, most likely the telnet test or simple email test will resolve the MX (mail exchanger) records.  SMTPDiag will help out here.  This posting is not intended to teach how email works, but hopefully you get the idea. 

So the final question, how do I verify my port 25 is open?  You can either send a telnet test or find an external port scanner that will scan your IP address.  If your machine is listening on port 25, you’ll see the port open in the results.  Most people are running a local firewall that will block the scan or a router such as linksys.  You can temporarily unblock port 25 on both your router and your local firewall so the scan will determine if port 25 is open.  If your ISP is blocking it, port 25 will not show up in the results.  At least by you unblocking the two common points you control, this can help isolate the ISP issue.  When you are done with the external port scanner, remember to enable these options again on the router and / or your local firewalll so you’ll not be potentially scanned by bots looking for rouge mail relay servers.

If you have other thoughts or experiences, please share them.  I hope this post helps you in your quest to get the mail server working, so you can send email from a 3rd party program, your ASP / ASP.NET application or some other program.


Steve Schofield
Microsoft MVP – IIS

IIS and .NET 2.0 interview questions

I had a 2 hour layover and was browsing the newsgroups.  A person posted a question wondering about interview questions regarding IIS and .NET 2.0.  I’m sure there are many other questions that I didn’t think to ask, here is the list I came up with.  If you have any questions, feel free to post them to the comments and I’ll update the thread.

PS: This is meant for a ‘systems’ or ‘itpro’ type person and not necessarily a developer type individual.

General IIS related questions

  • How do you isolate and troubleshoot an ASP and / or ASP.NET application?

  • What is your idea of locking down a server?

  • How do you feel about having developers or anyone else making changes directly in production?  Aka how do you normally handle change management.

  • What perfmon counters do you find useful in troubleshooting an IIS or related problem.

  • Do you have experience in working with web-farms, load-balancing environments?

  • What is your ideal way of handling content.  Remote Storage / NAS (network attached storage) vs. local content and replication.  If you use local content and replication what tools do you to use?

  • Are you familiar with DFS?

  • What debugging tools do you use for IIS?

  • What / Where would you put global .NET settings.  How would you lock them down?

  • Do you have any experience with SSL certificates?

  • Do you have experience with machines with multiple IP’s and how to handle several sites / applications on a machine.

  • What is your preference of handling machine accounts?  Do you like local vs. Active Directory based accounts.

  • Do you have experience with working in an AD environment that supports IIS.

  • Do you have experience with NLB (network load balancing) that comes with IIS.

  • How do you monitor the applications / sites to ensure the uptime is appropriate.  This might apply more to a monitoring environment, but it is good to know what to monitor.

  • Are you familiar with compression and the benefits.

  • Do you know what MIME types are for?

  • Do you know how to list all running applications on a server to determine which application pools are owned by what sites. (IISAPP)

  • Are you familiar with IISState, IIS Debug Diag. SSL Diag, SMTPDiag in the resource kit.

  • What tools do you use or have experience in load-testing an application.

  • What are some of the tools provided by MS.  WCAT, TinyGet, WAST.

  • Do you know how to configure host-headers and how they related to DNS.

  • What is your backup and recovery strategy for IIS

  • How would you handle migrating to another box?

  • How do you handle changes in IIS, scripting or manual changes?

  • Are you familiar with scripting languages such as VBScript, JScript, Powershell.

  • Are you familiar with IISCfg and related scripts such as adsutil

  • Do you have experience supporting multiple environments of IIS (different domains, dev / test /integration / production)

  • Are you familiar with ways to connect to remote databases such as db2, oracle, sql server

  • Do you know the differences between anonymous, integrated, basic, digest authentication.

  • What is your preferred method of publishing content?  FTP? FrontPage? WebDAV? Folder copy? Publish to a staging machine and replicate to the content source either on a nas or individual nodes.

  • Are you familiar with the other services in SMTP, FTP?

  • Do you know how to configure a smarthost?

  • Does the built-in FTP service support host-headers?

  • Do you know the benefits of using a COM+ package vs. Regsvr32

  • What certain local group is necessary if it is configured as a application pool user.

  • Do you know how to check a COM+ component to ensure it will not leak memory.

.NET 2.0

  • Can you run the 1.1 and 2.0 on the same box?  What are the limitations.

  • Can you explain what the ‘/bin’  folder is used for.

  • Do you know what user instancing is.

  • Do you know the difference between precompiled applications and publishing the source code.

  • Do you have any experience with partial trust or CAS (code access security)

  • What types of things cause an appdomain or application pool recycle.

  • What are the new folders in .NET 2.0 and what are they used for.

  • How / why does the machine key need to be the same across all machines in a web-farm.


  • What makes the IUSR account unique in IIS7 vs. previous versions.

  • What are some of the new ways of troubleshooting, Logging in IIS7

  • What are the major benefits of IIS7?  (FREB, Integrated Pipeline, IUSR same on all w2k8 boxes, Shared configuration, Modular architecture, configuration changes

SQL 2005 – What version are you running?

I had to work on deploying SQL 2005 service pack 2.  I tend to look at the version numbers so I can make sure the upgrade is consistent.  Well, SQL 2005 was a bit interesting.

If you have to deploy SQL 2005, you might want to read up on the posting from the PSS team.