What is the symptom?
In Exchange 2000 or 2003, when you have a delivery restriction based on distribution groups set on your connectors or recipients, message delivery to local mailboxes and to external recipients is slower than normal. Messages may be backed up in the "Messages Awaiting Directory Lookup" queue and/or "Messages Waiting to be Routed" queue. It may even cause backups in the Pre-Submission queue depending on the load on the server.
Why does this problem occur?
This problem occurs because Exchange 2000/2003 Server must expand the distribution groups to determine whether each user account is permitted to send or to receive the e-mail message. The results of this distribution group-expansion are not cached by Exchange 2000/2003 Server. Also, if a failure that can be retried occurs during this expansion process, Exchange 2000/2003 Server stops the distribution group-expansion process, and then retries the connection an hour later. The problem has been there since the early Exchange 2000 days.
How to fix this problem?
Exchange Server 2003
For Exchange Server 2003, the Microsoft-recommended solution is to use flat distribution group in combination with the RestrictionMethod registry key and the hotfix outlined in KB895407. Please note this solution is only effective if all the followings are true on the connector bridgehead server and/or distribution group expansion server:
1. Exchange Server 2003 SP2 has already been applied or the hotfix KB895407 is applied on Exchange Server 2003 SP1
2. The RestrictionMethod registry key is configured correctly.
3. All distribution groups used in the delivery restriction must be flat. If they are not then the nested groups will not be used in the restriction checking logic.
This registry key and hotfix solution helps with and changes the way delivery restrictions are checked for both per-recipient and per-connector, which greatly enhances messages delivery performance in an environment with delivery restriction for distribution groups. For more details about this solution, please refer to the following Microsoft Knowledge Base article:
In Exchange Server 2003, message delivery to local mailboxes and to external mailboxes is slower than you expect after you configure delivery restrictions based on distribution groups
Exchange 2000 Server
For Exchange 2000 Server, every possible effort should be made to upgrade, at least the server which is doing connector restrictions or distribution group expansion, to Exchange Server 2003 SP2. This is the preferred and recommended solution even for Exchange Server 2000 due to the extremely positive performance gain for connector restrictions checking capabilities of Exchange Server 2003 SP2. If you are running Exchange 2000 server and are truly unable to upgrade to Exchange Server 2003 SP2 to implement the recommended solution above, there are a couple workarounds you may consider by referring to the following Microsoft Knowledge Base articles:
XADM: Mail Delivery Is Slow if Recipients Are Configured with Delivery Restrictions Based on Group Membership
Mail delivery is slow after you configure delivery restrictions that are based on a distribution list
What is the situation in the upcoming Exchange Server 2007?
This message delivery performance issue is resolved in Exchange Server 2007, as there are no connector restrictions in Exchange Server 2007. Restrictions will be applied on policy in the core transport via Transports Rules in Exchange Server 2007. Connector restrictions will be completely gone and it's up to the Exchange Server 2007 Transport Rules to enforce restrictions.