Distributed SMTP

Last week, I figured out how to use distributed SMTP.  It is super cool.

Reason: use this technique if you want your web server to send email but when your web app tries to send email via the corporate email server, it seems to take a long time, or it errors out (or complains about permissions. etc)

Pre requisites: Install SMTP on your web server.  It is part of IIS and is not installed by default.


1.  Disable relaying.  Only allow relaying from

2. Set up Delivery options. 

If your production email server is MS Exchange server or if it requires authentication, you will probably want to set up “Outbound Security”. 
Then, you will want to set up “Advanced” routing.

3. Outbound security just makes it easier for your (web) SMTP server to contact/use the (production) mail server.  Best practice is to set up a generic account for authenticating to that server instead of using your own personal credentials.

4. Advanced options allow you to send the email to buffer the outgoing mail on your local smtp server, which will attempt to deliver it via your production server.  I set it up to attempt to send on its own before attempting to use the production email server (aka “Smart host”).  It seemed to work best.

So, there it is.  Now my web server doesn’t seem to hang when it sends email, it buffers the outgoing mail, other servers don’t suspect me of spamming and the email server is authenticating outgoing mail.



About Tim Golisch

I'm a geek. I do geeky things.
This entry was posted in Architecture, Computer and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s