News Stay informed about the latest enterprise technology news and product updates.

Exchange 2003 Query-Based Distribution Groups

In this tip from "15 tips in 15 minutes: Managing recipients and distribution lists," you'll learn everything you need to know about Query-based groups (QDGs), the new group type introduced by Exchange 2003.

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.

You are reading tip #4 from "15 tips in 15 minutes: Managing recipients and distribution lists," excerpted from Chapter 5 of the book Learning Exchange Server 2003, published by Addison-Wesley Professional.
You can create a QDG that includes an LDAP filter specifying mailbox-enabled users who have their mailbox on the designated server. You can then mail-enable the group and send it a message. The Exchange server works with a Global Catalog server to expand the group membership by executing the LDAP search. Creating a QDG You can use a QDG if you run Exchange 2003 on Windows 2000 or Windows Server 2003. The QDG class is added during the Forestprep stage of Exchange Setup, when new attributes and classes are added to the Active Directory schema.

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:

  1. Launch Active Directory Users and Computers.

  2. 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.

  3. 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.

    5.15
    Figure 5.15 New Object window showing alias for Query-Based Distribution Group. (Click on image for enlarged view.)

  4. Click Next. A filter selection window opens, as shown in Figure 5.16.

    5.16
    Figure 5.16 Selecting criteria for membership in a QDG involves creating LDAP query. (Click on image for enlarged view.)

  5. Check the options you want to include in your search. For example, you might want just users with mailboxes, or just mail-enabled contacts.

  6. 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.

    5.17
    Figure 5.17 QDG selection criteria can target users on certain Exchange servers. (Click on image for enlarged view.)

  7. 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.)

    5.18
    Figure 5.18 LDAP query builder showing advanced selection features that enable selecting a variety of object attributes. (Click on image for enlarged view.)

  8. 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.

    5.19
    Figure 5.19 Result of an LDAP query shown in the Preview window for a QDG. (Click on image for enlarged view.)

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.

QDG caveats

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

 Home: Introduction
 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.

Dig Deeper on Exchange Server setup and troubleshooting

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchSQLServer

SearchEnterpriseDesktop

SearchVirtualDesktop

Close