random thoughts, formed in the twisted mind of a coder... RSS 2.0
# Friday, August 08, 2008

To configure Microsoft's IIS SMTP (which is also the base for Microsoft Exchange 2000 and 2003) you can use about five different approaches.

  • IIS Management Interface
  • ADSI
  • WMI
  • Edit the Metabase
  • Edit the registry

As in most cases the IIS Management Interface doesn't provide all the options you need, you have to go on to more abstract ways.

When you use ADSI or WMI, you're actually editing the Metabase. It's very useful for writing scripts and other automated processes, but not so much for an initial config. In the last case you would rather want to use Notepad to edit the Metabase by hand.

The Metabase has a lot of settings (and combination of settings) which are not enabled in the IIS Management Interface. For example, you are able to set (a different) smarthost address per local domain by applying a different RouteAction. Or you could simply add a wildcard domain like *.com

But then there are always some "little" things that you still can't configure using all those approaches mentioned above. This is where the Registry comes in. The registry can set some additional start-up parameters on the SMTPSVC Service. This service is the main service for IIS SMTP and is also used by Exchange 2000 and 2003.

Because I couldn't find an exhaustive list of the available Registry settings anywhere on the net, I decided to present you one here. There might be some more. If so, please comment me on that and I'll add them to the list. Also, please tell me about any errors on this page.

Also know that all these settings work for IIS SMTP even though mosts sites tell you they only work for Exchange systems

path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name MaxDSNSize
type REG_DWORD
value size in bytes
description A system administrator may specify a size limit for original messages that will be attached to the NDR message. Messages that are larger the the limit specified will not be attached to the NDR message. When set to 0, the original message is not sent along at all.
applies to IIS SMTP, Exchange 2000/2003
more info http://support.microsoft.com/default.aspx?scid=kb;en-us;555231
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name GlitchRetrySeconds
type REG_DWORD
value number of seconds
description To retry an outbound connection after beeing greylisted, set this key to the appropriate time-to-wait. Greylisting is a spam-pervention measurement where the first connection attempt is dropped and the second connection may pass after waiting several seconds.
applies to IIS SMTP, Exchange 2000/2003
more info http://technet.microsoft.com/en-us/library/aa998772.aspx
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Parameters\
key name TarpitTime
type REG_DWORD
value number of seconds
description To tarpit every failure response to a connected client (4xx and 5xx responses) set this value to the appropriate time-to-wait. Tarpitting is an email address harvesting prevention measurement. By enabling tarpitting it takes too long to harvest email addresses on your server because every bad-guessed address takes a number of seconds to wait.
applies to IIS SMTP, Exchange 2000/2003
more info http://support.microsoft.com/kb/899492
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name ZombieDomainEntryThreshold
type REG_DWORD
value number of messages
description To prevent your queue beeing stuffed by messages to zombie domains, you can define a threshold. When this threshold is reached for any domain, mail will no longer be queued for that domain.
applies to IIS SMTP, Exchange 2000/2003
more info http://support.microsoft.com/kb/910932
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name MaxBadMailFolderSize
  type REG_DWORD
  value size in kilobytes (-1 is no limit)
key name BadMailSyncPeriod
  type REG_DWORD
  value time in minutes (not specified is 12 hours)
description To prevent your badmail directory from growing indefinately, you can set a maximum size to your badmail directories (goes for all virtual server instances). This is a hard maximum and not a circular buffer. It just stops putting in more badmails. IIS checks once in a while to see if there is some free space again. This time is set by the BadMailSyncPeriod key.
applies to IIS SMTP, Exchange 2000/2003
more info http://msexchangeteam.com/archive/2004/07/20/188856.aspx
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name MsgHandleThreshold
  type REG_DWORD
  value number of filehandles
key name MsgHandleAsyncThreshold
  type REG_DWORD
  value number of filehandles
key name FileCacheMaxHandles
  type REG_DWORD
  value number of filehandles
description Large SMTP systems with queue sizes over 1000 messages can have problems with the filesystem and with memory. To increase the queue size, set the both thresholds to a size over 1000 (the default value). Set them both to the same size. To reduce memory used by the handle cache, set the FileCacheMaxHandles to any size below 800 (the default value).
applies to IIS SMTP, Exchange 2000
more info http://searchexchange.techtarget.com/news/article/0,289142,sid43_gci959619,00.html
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\
key name PoolThreadLimit
  type REG_DWORD
  value number of threads (-1 or 0xFFFFFFFF is unlimited) 
path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC\Queuing\
key name MaxPercentPoolThreads
  type REG_DWORD
  value percentage (90% is default)
key name AdditionalPoolThreadsPerProc
  type REG_DWORD
  value percentage (90% is default)
description PoolThreadLimit is a hard limit that includes all IIS pool threads.
MaxPercentPoolThreads limits the percentage of ATQ threads that the SMTP service can use. The recommended setting is 90/( 2*Number of SMTP virtual server instances ).
AdditionalPoolThreadsPerProc determines additional pool threads per processor that the Inetinfo process creates when the SMTP service is started. The recommended setting is ((9/(MaxPercentPoolThreads/100))–4)/2
applies to IIS SMTP, Exchange 2000
more info http://technet.microsoft.com/en-us/library/bb123978.aspx

Friday, August 08, 2008 11:09:46 AM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0]
Microsoft SMTP
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2014
Martijn Thie
Sign In
Statistics
Total Posts: 18
This Year: 0
This Month: 0
This Week: 0
Comments: 161
All Content © 2014, Martijn Thie
DasBlog theme adapted from 'Business' (originally by delarou)