ASPNetFAQ.com: What is ASP.NET?

Technology posts on ASP.NET, IIS, Windows (+ a little Linux), Cloud Servers, Hosting, and more!
  • Blog Home
Search the site...

Configuring Microsoft’s SMTP Service to allow relay

Tweet
Share
0 Shares

My recent post on Installing the Microsoft IIS SMTP Service on Windows Server 2008 helps people get up-and-running with a local SMTP service to support the sending of emails from code (i.e.: C# Sample For Sending Emails). Just getting the SMTP service running though is only the first step – the default installation actually WON’T let you send an emails because the “relay” function is locked down tightly (effectively disabled). The very good reason for this is to keep someone from installing the service without changing the defaults and then having their server function as an open relay for spammers.

So let’s get started. You access the Microsoft SMTP service through the legacy IIS6 Management tools that were installed at the same time that the SMTP service was installed (reference my earlier post from the link above).




IIS-SMTPRelay1

Once there, right-click on the SMTP Virtual Server and choose the Properties option.

IIS-SMTPRelay2

From the Properties dialog window you want to access the Relay Restrictions. This controls who can (or can’t) use this SMTP service for sending email – “relaying” it from your code to a remote final destination.

IIS-SMTPRelay3

By default the relay restrictions have a setting to allow “only the list below” to relay from the machine. What you need to do is to add an entry to allow 127.0.0.1 (aka “localhost” – anything sent from the local machine) as an acceptable relay source.

IIS-SMTPRelay4

IIS-SMTPRelay5

Clicking OK after adding it and you’ll now see it in the list as “granted” access.

IIS-SMTPRelay6

Click OK a few times and you’re done! Now go test with some sample code that sends emails from the local machine and it should relay (forward) the emails on to the final destination just as expected.




Happy hosting!
Brad on Google+

More from my site

  • Installing the Microsoft IIS SMTP Service on Windows Server 2008Installing the Microsoft IIS SMTP Service on Windows Server 2008
  • What makes good web hosting?What makes good web hosting?
  • IIS7 Application Pool Idle Time-out SettingsIIS7 Application Pool Idle Time-out Settings
  • GMail’s Send As Feature – SMTP RelayingGMail’s Send As Feature – SMTP Relaying
  • Cloud Server FlexibilityCloud Server Flexibility
Tweet
Share
0 Shares
Hosting, IIS, server, smtp

Comments are closed.

Proverbs 19:20

"Get all the advice and instruction you can, so you will be wise the rest of your life."

A Note On WordPress Hosting

Our main focus is of course .NET, but with a mix of Linux, virtualization, and other technologies. But if you're really looking for the best WordPress hosting specifically, read my WordPress host review to save yourself hassle AND money!




Recent Posts

  • What makes good web hosting?
  • jQuery Mobile C# ASP.NET and N5 Networks Software Repository
  • Open Source Bug Tracking Software and the Orchard Project
  • ASP.NET Development with Dreamweaver MX: Visual QuickPro Guide
  • Kendo UI Sample, ASP.NET Ajax Tutorial & More

Tags

ASP.NET Automation centos CMS css cytanium Development/Coding Email gmail Hosting htaccess http https IIS javascript Learning Linux logparser MySQL nginx openssl OrcsWeb performance PowerShell redirect RHEL security server SherWeb smtp SQL/Databases ssl System Administration telnet terminal tip Troubleshooting Ubuntu virtualization Visual Studio web farm web hosting Windows windows server Wordpress

Categories

  • ASP.net development
  • Development/Coding
  • Hosting
  • IIS (Internet Information Services)
  • SQL/Databases
  • System Administration
  • Virtualization
(c) ASPNETFAQ.com