How to set a limit on the number of SMTP messages in queues (258748)



The information in this article applies to:

  • Microsoft Windows Server 2003, Standard Edition, when used with:
    • Microsoft Exchange Server 2003 Standard Edition
    • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Windows 2000 Server, when used with:
    • Microsoft Exchange Server 2003 Standard Edition
    • Microsoft Exchange Server 2003 Enterprise Edition
    • Microsoft Exchange 2000 Server
    • Microsoft Exchange 2000 Enterprise Server

This article was previously published under Q258748
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

INTRODUCTION

If you want to limit the number of Simple Mail Transfer Protocol (SMTP) messages that may be queued on a Microsoft Windows 2003 or Microsoft Windows 2000 SMTP Server, you can use the MaxMessageObjects registry key. If the limit is reached, no additional incoming messages are accepted by SMTP.

MORE INFORMATION

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
If Microsoft Exchange is not installed on the computer, you can install the SMTP protocol in Internet Information Services (IIS).

Note By default, the SMTP service is installed with Windows Server 2003 and Windows 2000.

To install the SMTP protocol in IIS, follow these steps:
  1. Click Start, and then click Control Panel.
  2. Click Add or Remove Programs, and then click Add/Remove Windows Components.
  3. Click Internet Information Services (IIS), and then click Details.
  4. Click to select the SMTP Service check box, and then click OK.
  5. Click Next, and then click Finish.
To set a limit on the number of SMTP messages that can be queued, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Expand HKEY_LOCAL_MACHINE, expand Software, expand Microsoft, and then expand Exchange.
  3. Right-click the Exchange key, and then click New Key.
  4. Type MailMsg.
  5. Right-click this new key, and then click New DWORD Value.
  6. Right-click the new value, click Rename, and then type MaxMessageObjects.
  7. Right-click the value, click Modify, and then set the value to the maximum number of messages that you want to be in queues at any time. The default (if the key is not present) is 100,000, which is the suggested limit.
The MaxMessageObjects key refers to the maximum number of mail messages that the system can allocate. When that number of messages is in a queue on the server, additional incoming messages that come in through the SMTP protocol are refused with a 4xx (temporary) error. The actual number of mail messages allocated is 90 percent of MaxMessageObjects, up to a limit of 90,000. To increase the number of objects greater than 90,000, set the MessageObjectsInboundCutoffCount registry key to the value that you want. Do not set the MessageObjectsInboundCutoffCount value more than 90 percent of the MaxMessageObjects key because additional messages are created during message processing for DSN generation and content conversion.

Modification Type:MajorLast Reviewed:6/23/2005
Keywords:kbinfo KB258748