Exchange 2003 introduced a new group type called a Query-Based Distribution group, or QDG. Instead of a static Member attribute that you must manually populate with accounts, a QDG uses an LDAP query to build a membership list dynamically.
The power of a QDG lies in its flexibility. For example, let's say you plan to take an Exchange server down for maintenance. You want to notify users of the maintenance, but you don't want to bother users on other servers.
To create a QDG, the Exchange organization must be in Native mode. Legacy Exchange servers don't know how to process QDGs. If you attempt to create a QDG in Mixed mode, you'll get an error message even though the option exists on the property menu. Create a QDG as follows:
- Launch Active Directory Users and Computers.
- Right-click an OU where you want to create the group and select New -> Query-based Distribution Group from the flyout menu. This opens a New Object window, as shown in Figure 5.15.
- Enter a name for the group, such as QDG5 or Phoenix Recipients or something that reflects the nature of the LDAP query you'll be using.
- Click Next. A filter selection window opens, as shown in Figure 5.16.
- Check the options you want to include in your search. For example, you might want just users with mailboxes, or just mail-enabled contacts.
- If you want to be more selective, click Customize Filter and then click Customize to open a Find Exchange Recipients window. Figure 5.17 shows an example with the Storage tab selected.
- The Advanced tab of the Find Exchange Recipients window exposes an even more detailed set of search options, shown in Figure 5.18. You can select search criteria that include any attribute of any type of recipient -- user, group, contact, or public folder. In the example, the QDG members would include all Exchange recipients (mail-enabled user; mailbox-enabled user; and mail-enabled groups, contacts, and public folders) who work in the Phoenix office. (For this query to work, you would need to have a work process that populates the Office Location field for user objects in Active Directory.)
- Click OK, then Next, and then Finish to create the group. Always preview the result of the LDAP query before using the group by opening the Properties window for the group and selecting the Preview tab, as shown in Figure 5.19.
It's important that the LDAP search you define for the QDG produces at least one result. If the preview tab does not list at least one recipient, anyone sending a message to the group will get a NDR.
It's also important that you formulate the LDAP query so that only users, groups, and contacts that are able to receive email get included in the result. If the query results in even one invalid recipient, Exchange cannot send a message to anyone in the group. Checking the search results in the preview window can be difficult for a large QDG, so always test the QDG by sending it an email.
When a user addresses a message to a QDG, the Exchange server plucks the LDAP search criteria from the QDG definition and sends it to a Global Catalog server, along with a list of email attributes it needs for the group's members. The Global Catalog server executes the LDAP search, looks up the email attributes for each member, and returns the result to the Exchange server. The Exchange server then sends the message to each member.
You can put fairly complex queries into a QDG, and the result could include a large number of recipients, so using a lot of QDGs could overload your Global Catalog servers. Until you get a feel for their performance impact in your system, use QDGs sparingly. You can nest QDGs into other groups, so be on the lookout for performance and execution issues with standard groups that have QDGs as members.
If you run Exchange 2003 on Windows 2000, you'll need to adjust the SMTP service to adapt to LDAP page handling to avoid performance problems when using QDGs. This requires a Registry change (documented in Microsoft Knowledge Base article 822897):
Key: HKLM | SYSTEM |CurrentControlSet | Services | SMTPSVC Â| Parameters Value: DynamicDLPageSize Data: 31 (REG_DWORD)
15 tips in 15 minutes: Managing recipients and distribution lists
Tip 1: Exchange security groups
Tip 2: Group membership expansion
Tip 3: Managing Exchange group email properties
Tip 4: Exchange 2003 Query-Based Distribution Groups
Tip 5: DSAccess for Exchange
Tip 6: DSProxy for Exchange
Tip 7: Managing Exchange recipient policies
Tip 8: Exchange Recipient Update Service and proxy addresses
Tip 9: Restricting mail storage on an Exchange server
Tip 10: The Exchange server mailbox management service
Tip 11: Blocking a user's email access
Tip 12: Accessing another user's mailbox in Outlook
Tip 13: Exchange mail retention
Tip 14: Managing recipients with system policies
Tip 15: Managing recipients with Global Settings
This chapter excerpt from Learning Exchange Server 2003 by William Boswell is printed with permission from Addison-Wesley Professional, Copyright 2004. Click here for the chapter download or to purchase the book.