17.21. Creating a Query-Based Distribution List

Problem

You want to create a query-based distribution list.

Tip

Creating a mail-enabled query-based distribution list requires the Exchange organization be in Exchange Native Mode. See MS KB 829577.

Solution

Using a graphical user interface

  1. Open the ADUC snap-in.

    Tip

    This needs to be run on a workstation or server that has the Exchange Management Tools loaded (see Recipe 17.6).

  2. If you need to change domains, right-click on Active Directory Users and Computers in the left pane, select Connect to Domain, enter the domain name, and click OK.

  3. In the left pane, browse to the parent container of the new object, right-click on it and select New Query-based Distribution Group.

  4. Enter the group name and mail alias and click Next.

  5. Select the search base, enter the specifics of the filter, and then click Next.

    Tip

    The filter should be a standard LDAP filter—e.g., (&(objectcate-gory=user)(homeMDB=*)( employeeType=FT)).

  6. Verify the summary and click Finish.

Using a command-line interface

First, you need to create an LDIF file called add_qbdl.ldf with the following contents:

dn: CN=<QB DL Name>,<ParentDN> 
changetype: add
cn: <QB DL Name>
displayName: <QB DL Name>
objectClass: msExchDynamicDistributionList
mailNickname: <mail nickname>
legacyExchangeDN: <legacy Exchange DN>
msExchDynamicDLFilter: <LDAP Filter>
msExchDynamicDLBaseDN: <BaseDN>
reportToOriginator: TRUE
systemFlags: 1610612736

Replace <QB DL Name> with the name of the address list, <mail nickname> with ...

Get Windows Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.