Troubleshooter: Shrinking the Badmail Folder

Find out about a mail folder that Exchange uses to store mail that it can't deliver locally and what steps you can take to clean it up.

Paul Robichaux

June 22, 2003

1 Min Read
ITPro Today logo in a gray background | ITPro Today

Over time, the badmail folder on my SMTP gateway has steadily consumed more and more space. What does this directory contain, and do I need it?

Exchange Server uses the badmail folder to catch mail that the server accepts but can't deliver locally. The number and types of messages in the badmail folder will vary. For example, one server that I know of that was used as an open relay contained several million nondelivery report (NDR) messages in its badmail folder. The most common reason you receive badmail messages, however, is that an outside sender sends mail to an address that doesn't exist in your organization.

You can safely remove badmail messages at any time. Discarding these messages manually is easy but can be time-consuming if there are many messages, so you might consider using Task Scheduler to schedule a small removal script. You can also take steps to avoid receiving messages in your badmail folder in the first place. To do so, create a mail-enabled distribution group with no members. Then, whenever someone leaves your organization, use Exchange System Manager (ESM) to add that person's SMTP address to the distribution group. Exchange will accept new mail for the missing person but won't deliver it because the distribution group doesn't actually contain any members. A final, more interesting, alternative is to use the "Catchall" mailbox sink event that the Microsoft article "HOW TO: Create a 'Catchall' Mailbox Sink for Exchange 2000" (http://support.microsoft.com/?kbid=324021) describes. This sink forwards any mail sent to any unassigned address in a domain to any mailbox that does exist.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like