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.
- Click Start, click Run, type regedit in the Open box, and then click OK.
- Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\SMTPSVC
- On the Edit menu, point to New, click Key, type Queuing, and then press ENTER.
- Double-click Queuing.
- On the Edit menu, point to New, and then click DWORD Value.
- Type MaxBadMailFolderSize, and then press ENTER.
- Double-click MaxBadMailFolderSize, type the maximum size of the Badmail folder in KB, click Decimal, and then click OK.
- On the Edit menu, point to New, and then click DWORD Value.
- Type BadMailSyncPeriod, and then press ENTER.
- 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.
- Close Registry Editor.
- Restart the SMTP service. To do this, follow these steps:
- Click Start, point to Programs, point to Administrative Tools, and then click Services.
- 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: