Skip navigation

JSI Tip 9490. How can I set a limit on the number of SMTP messages that may be queued?


The default limit on the number of incoming messages that mayed by queued by your SMTP (Simple Mail Transfer Protocol) server is 100000 (One hundred thousand). When this limit is reached, no additional incoming messages are accepted by SMTP.

Using REG.EXE built into Windows XP and Windows Server 2003, or REG.EXE installed from the Windows 2000 Support Tools on the CD-ROM, I have scripted MaxSMTPQue.bat to set limit on the number of SMTP messages that may be queued.

The syntax for using MaxSMTPQue.bat is:

MaxSMTPQue NumbMsg ComputerName1 \[ComputerName2 ... ComputerNameN\]

Where NumbMsg is the limit you want to set, and each ComputerNameX is the NetBIOS name of a SMTP server you wish to configure.

MaxSMTPQue.bat contains:

@echo off
If \{%2\}

\{\} @echo Syntax: MaxSMTPQue NumbMsg ComputerName1 \[ComputerName2 ... ComputerNameN\]&goto :EOF setlocal ENABLEDELAYEDEXPANSION set wrk=%1 shift set wrk=%wrk:"=%# set wrk=%wrk:,=% :lz if "%wrk:~0,1%" NEQ "0" goto setNumb set wrk=%wrk:~1% goto lz :setNumb set wrk=%wrk:#=% if "%wrk%" EQU "" @echo Syntax: MaxSMTPQue NumbMsg ComputerName1 \[ComputerName2 ... ComputerNameN\]&endlocal&goto :EOF set /a NumbMsg=%wrk% set /a CutOff=%NumbMsg% / 100 set /a CutOff=%CutOff% * 90 @echo. :loop if \{%1\}

\{\} endlocal&goto :EOF set computer=%1 shift set computer=%computer:"=% set computer=%computer:\=% @echo REG ADD "\\%computer%\HKLM\SOFTWARE\Microsoft\Exchange\MailMsg" /V MaxMessageObjects /T REG_DWORD /F /D %NumbMsg% REG ADD "\\%computer%\HKLM\SOFTWARE\Microsoft\Exchange\MailMsg" /V MaxMessageObjects /T REG_DWORD /F /D %NumbMsg% @echo. @echo REG ADD "\\%computer%\HKLM\SOFTWARE\Microsoft\Exchange\MailMsg" /V MessageObjectsInboundCutoffCount /T REG_DWORD /F /D %CutOff% REG ADD "\\%computer%\HKLM\SOFTWARE\Microsoft\Exchange\MailMsg" /V MessageObjectsInboundCutoffCount /T REG_DWORD /F /D %CutOff% @echo. goto loop



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish