Topic Last Modified: 2005-11-18

The Microsoft® Exchange Server Analyzer Tool reads the following registry entry to determine the maximum number of mail messages that the system can allocate:

HKEY_LOCAL_MACHINE\Software\Microsoft\Exchange\MailMsg\MaxMessageObjects

If the Exchange Server Analyzer finds the value for MaxMessageObjects is less than 30001, a warning is displayed.

When the queue contains the maximum number of messages, no additional inbound messages are accepted by Simple Mail Transfer Protocol (SMTP). Each mail message resident in the SMTP queue uses at least 4 kilobytes (KB) of memory; therefore, it is possible to run into a low memory situation with a very large queue.

The MaxMessageObjects value is not present by default, and the maximum number of messages is set to 100,000. Setting MaxMessageObjects lower reduces the maximum number of messages that can reside in the queue, therefore decreasing the maximum memory footprint for SMTP. After this limit is reached, each SMTP connection made to the server will return with an out of memory error.

Important:
This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore the registry if a problem occurs. For information about how to restore the registry, view the "Restore the Registry" Help topic in Regedit.exe or Regedt32.exe.

To set a limit on the number of SMTP messages that may be queued

  1. Start a registry editor such as Regedit.exe or Regedt32.exe.

  2. Navigate to: HKLM\Software\Microsoft\Exchange

  3. Right-click the Exchange key, and then click New Key. Name the new key MailMsg.

  4. Right-click the MailMsg key, and then click New DWORD Value.

  5. Right-click the new value, click Rename, and then type MaxMessageObjects.

  6. Double-click the MaxMessageObjects value, and then set it to the maximum number of messages that you want to be in queues at any time. Unless you need to process more messages, a maximum value of 100,000 is recommended.

  7. Exit the registry editor and restart the SMTP service for the change to take effect.

Before you edit the registry, and for information about how to edit the registry, see the Microsoft Knowledge Base article 256986, "Description of the Microsoft Windows Registry" (http://go.microsoft.com/fwlink/?linkid=3052&kbid=256986).

For more information about setting limits on messages in queues, see the Microsoft Knowledge Base article 258748, "How to set a limit on the number of SMTP messages in queues" (http://go.microsoft.com/fwlink/?linkid=3052&kbid=258748).