The Badmail folder is disabled in Exchange Server 2003 SP1 (884068)



The information in this article applies to:

  • Microsoft Exchange Server 2003 Standard Edition, Service Pack 1 (SP1)
  • Microsoft Exchange Server 2003 Enterprise Edition, Service Pack 1 (SP-1)

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

INTRODUCTION

This article discusses an issue where, after you install Microsoft Exchange Server 2003 Service Pack 1 (SP1), e-mail messages are no longer written to the Badmail folder of an Exchange SMTP virtual server.

MORE INFORMATION

After you install Exchange 2003 SP1, messages are no longer written to the Badmail folder. This change in behavior prevents the Badmail folder from filling up with messages.

Note The Badmail folder is located at drive:\Program Files\Exchsrvr\Mailroot\Vsi 1\BadMail. In this path name, drive is the drive where Exchange 2003 is installed.

You can manually create two new registry values to change the default behavior. The MaxBadMailFolderSize registry entry is used to specify the maximum size of the Badmail folder. The BadMailSyncPeriod registry entry controls how frequently the system examines the size of the Badmail folder.

If the MaxBadMailFolderSize registry entry is manually created and is set to 0 (zero), messages are not written to the Badmail folder. This is the Exchange Server 2003 SP1 default behavior.

If the value of the MaxBadMailFolderSize registry entry is set to a value other than 0, all Badmail messages are sent to the Badmail folder until the folder size reaches the limit in kilobytes (KB) that is specified in the registry value. When the folder size reaches the limit, messages are no longer sent to the Badmail folder.

If the value of the MaxBadMailFolderSize entry is set to FFFFFFFF, all messages are sent to the Badmail folder. This is the default behavior of versions of Exchange that are earlier than Exchange Server 2003 SP1.

The BadMailSyncPeriod registry entry indicates in minutes how frequently the system examines the size of the Badmail folder. To improve performance, the SMTP Advanced Queuing Engine determines the size of the Badmail folder by reading cached folder size information. When the cached folder size information indicates that the Badmail folder size limit has been reached, messages are no longer delivered to the Badmail folder.

To configure the new MaxBadMailFolderSize and BadMailSyncPeriod registry entries, follow these steps.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following registry subkey:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC

  3. On the Edit menu, point to New, click Key, type Queuing, and then press ENTER.
  4. Double-click Queuing.
  5. On the Edit menu, point to New, and then click DWORD Value.
  6. Type MaxBadMailFolderSize, and then press ENTER.
  7. Double-click MaxBadMailFolderSize, type the maximum size of the Badmail folder in KB, click Decimal, and then click OK.
  8. On the Edit menu, point to New, and then click DWORD Value.
  9. Type BadMailSyncPeriod, and then press ENTER.
  10. Double-click BadMailSyncPeriod, type the time in minutes until the local cache of the Badmail folder is synchronized with the Badmail folder in Exchange, click Decimal, and then click OK.
  11. Close Registry Editor.
  12. Restart the SMTP service. To do this, follow these steps:
    1. Click Start, point to Programs, point to Administrative Tools, and then click Services.
    2. Right-click SMTP Service, and then click Restart.
If you set the MaxBadMailFolderSize to FFFFFFFF to revert to the behavior that is present in earlier versions of Exchange, you can use the BadMailAdmin.exe tool to prevent the Badmail folder from filling up. You can use the BadMailAdmin.exe tool to delete or to archive Badmail folder messages based on their date or their size. This tool can be configured to run automatically as a scheduled task. This would reduce the administrative overhead of the following tasks:
  • Manually deleting messages in the Badmail folder
  • Manually archiving messages in the Badmail folder
  • Manually checking the size of the Badmail folder
To download the BadMailAdmin.exe tool, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:4/27/2005
Keywords:kbTransport kbRegistry kbtshoot kbinfo KB884068 kbAudITPRO