Article ID: 111607, created on Jul 7, 2011, last review on Aug 12, 2014

  • Applies to:
  • Operations Automation


After the transition from Exchange 2003 to Exchange 2007, mail-enabled Public Folders are not shown in the OWA address book.


In Exchange 2007, the hosted environment purposely configured the msExchQueryBaseDN attribute to point to the organization's global address list. The reasons for this are as follows:
1. To have the same GAL lookup result in Outlook, OWA and ActiveSync.
2. To have mailboxes that are hidden from the organization GAL also be hidden from the address book in OWA.

But in the Exchange 2003 hosted environment, the msExchQueryBaseDN attribute was configured to point to the organization's OU. Changing the attribute to point to the organization's GAL is not performed automatically during the transition procedure.


You can fix mailboxes automatically. It is possible to fix either all mailboxes of one subscription, or all Exchange 2007 subscriptions. If you are fixing all mailbox subscriptions, the setting ("GAL") is applied on the system level, and becomes the default value for all newly created mailboxes.

You can reference the following example, which was used to set msExchQueryBaseDN point to a "GAL" for all mailboxes of subscription 1000111.

For the Linux Management node execute:cd /usr/local/pem
. ./bin/
./bin/Exchange_ctl -f etc/pleskd.props sc dumpMsExchQueryBaseDn 1000111 GAL

Note: to see usage, execute:
./bin/Exchange_ctl -f etc/pleskd.props sc
Use the following script in order to set msExchQueryBaseDN for all mailboxes in all subscriptions:
export hn=`hostname`; for subid in ` psql -Uplesk -h${hn} -At -c 'select subscription_id from exch_domain_services where exchange_version=2007 ;' `  ; do echo -n "Subscription $subid:"; cd /usr/local/pem ; . ./bin/ ; ./bin/Exchange_ctl -f etc/pleskd.props sc dumpMsExchQueryBaseDn ${subid} GAL 2>/dev/null ; res=$?; if [ $res -eq 0 ]; then  echo -e " \e[00;32mSUCCESS\e[00m" ;  else    echo -e " \e[00;31mFAILED\e[00m";    fi  ;  done

For Windows Management node execute:
cd C:\Program Files\SWSoft\PEM
bin\Exchange_ctl -f etc\pleskd.props sc dumpMsExchQueryBaseDn 1000111 GAL

Note: to see usage, execute:
bin\Exchange_ctl -f etc\pleskd.props sc

After checking the work-around on one subscription as described above, apply it on all existing Exchange 2007 subscriptions. The value of the new mailboxes should be as follows:
./bin/Exchange_ctl -f etc/pleskd.props sc dumpMsExchQueryBaseDn 0 GAL


1. The following task(s) are scheduled during the execution of Exchange_ctl:

Task name: Set "msExchQueryBaseDn" attribute to GAL for 27 mailboxes
Task name: Set "msExchQueryBaseDn" attribute to OU for 27 mailboxes
Task description: Subscription 1000111; Domain service 984

2. Alternatively, to manually fix a mailbox "TestMailbox" from subscription #1000111, follow these steps:

  1. Start adsiedit (Start -> Run -> adsiedit.msc), this tool is available from the Support Tools.
  2. Expand the Domain branch, go to <Your Domain> -> Hosting -> <Provider or Reseller> -> S0001000111
  3. Right click on the user and open properties, locale msExchQueryBaseDN attribute in the list
  4. Change the attribute to the distinguished name of the S0001000111 OU, e.g. "OU=S0001000111,OU=Provider,OU=Hosting,DC=hosting,DC=local", where DC=hosting,DC=local is your AD domain.

3. Similar / related KB:

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF