How to Set the MaxMessageObjects Registry Value

 

Each message in an SMTP queue uses at least 4 KB of memory; therefore, you can experience low memory if the queue grows very large. Lowering this setting reduces the maximum number of messages that can reside in the queue, therefore decreasing the maximum memory footprint for SMTP. When that number of messages is in queue on the server, additional inbound messages that come in through the SMTP protocol are refused with a 4xx (temporary) error.

You can set the MaxMessageObjects registry value to specify a number of messages that can exist in an SMTP queue. The MaxMessageObjects registry value is not present by default, and the default maximum number of messages that can be in an SMTP queue at any given time is 100,000.

Before You Begin

Before you perform the procedure in this topic, be aware that the procedure contains information about editing the registry.

Warning

Incorrectly editing the registry can cause serious problems that may require you to reinstall your operating system. Problems resulting from editing the registry incorrectly may not be able to be resolved. Before editing the registry, back up any valuable data.

Procedure

To set the MaxMessageObjects registry value

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

  2. Navigate to HKLM\Software\Microsoft\Exchange

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

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

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

  6. Double-click 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, it is recommended that you use a maximum value of 100,000.

  7. Close the registry editor and restart the Simple Mail Transfer Protocol (SMTP) service for the change to take effect.

For More Information

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