Настройка autodiscover dns exchange
Разберем процесс создания инфраструктуры для автоматической настройки почтовых клиентов. Для корректной работы Autodiscover нужен комплексный подход, так как у разных почтовых клиентов свои требования.
Autodiscover services and Active Directory
Exchange stores in Active Directory the configuration of Exchange servers in the organization as well as information about your users' mailboxes. Before you install Exchange Server, you need to prepare your Active Directory forest and its domains. If you aren't familiar with Exchange forests or domains, see Step 3: Prepare Active Directory domains.
Exchange automatically creates at installation the virtual directory autodiscover in IIS, the frontend Client Access services web site that clients connect to. This allows Outlook to discover the Exchange mailbox settings so that users don't have to deal with manually configuring advanced settings.
The SCP object is also created in Active Directory at the same time as the Autodiscover service virtual directory. The SCP stores and provides authoritative URLs of the Autodiscover service for domain-joined computers.
You need to update the SCP object to point to the Exchange server. This is necessary because Exchange servers provide additional Autodiscover information to clients to improve the discovery process. You can use the Set-ClientAccessService cmdlet to update the SCP object. For more information, see Set-ClientAccessService.
You need to be assigned permissions before you can run the Set-ClientAccessService cmdlet. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.
Autodiscover makes it easy to retrieve the information that you need to connect to mailboxes on Exchange servers. SCP objects locate those Autodiscover servers or endpoints appropriate for the user you're retrieving settings for. And SCP objects in AD DS provide an easy way for domain-joined clients to look up Autodiscover servers.
Exchange publishes two types of SCP objects for the Autodiscover service:
SCP pointers: Contains information that points to specific LDAP servers that should be used to locate Autodiscover SCP objects for the user's domain. SCP pointers are stamped with the following GUID: 67661d7F-8FC4-4fa7-BFAC-E1D7794C1F68.
SCP URLs: Contains URLs for Autodiscover endpoints. SCP URLs are stamped with the following GUID: 77378F46-2C66-4aa9-A6A6-3E7A48B19596
The SCP object contains the authoritative list of Autodiscover service URLs for the forest. To learn more about locating Autodiscover service endpoints, see Generate a list of Autodiscover endpoints.
Depending on whether you configured the Autodiscover service on a separate site, the Autodiscover service URL will be either of the following values, where // is the primary SMTP domain address:
For more information about SCP objects, see Publishing with Service Connection Points.
Этап 3. Проверка других альтернатив
Рисунок 4. Проверка других альтернатив
Отправка запроса GET без проверки подлинности
Запрос к DNS на запись SRV
Если запрос GET без проверки подлинности не принес результатов, вы можете попробовать запросить у DNS запись SRV для службы автообнаружения. Запись будет иметь вид "_autodiscover._tcp." + домен. Этот запрос может вернуть несколько записей, но следует использовать только те записи, которые указывают на конечную точку SSL, а также имеют самые высокие приоритет и вес.
Все адреса
Наш файл конфигурации рассчитан только на настройку одного адреса. Теперь нужно настроить его на обслуживание любого email. Для этого необходимо написать скрипт, например, на php и немного донастроить сервер.
PHP и php-fpm
Установим php и php-fpm, после разрешаем автозапуск php-fpm и стартуем его:
а) если сервер под CentOS / Red Hat:
yum install php php-fpm
systemctl enable php-fpm
systemctl start php-fpm
б) если сервер под Debian / Ubuntu:
apt-get install php php-fpm
systemctl enable php7.2-fpm
systemctl start php7.2-fpm
* где 7.2 — версия установленной php (проверяется командой php -v).
Настроим php-fpm
а) если сервер под CentOS / Red Hat:
systemctl restart php-fpm
б) если сервер под Debian / Ubuntu:
systemctl restart php7.2-fpm
NGINX
Внесем настройки в наш виртуальный домен:
.
error_page 405 =200 $uri;
location ~ \.php$ set $root_path /usr/share/nginx/html/autodiscover;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $root_path$fastcgi_script_name;
include fastcgi_params;
fastcgi_param DOCUMENT_ROOT $root_path;
>
.
* мы добавили обработку скриптов php с помощью php-fpm.
Перезапускаем наш сервер:
systemctl reload nginx
Готовим скрипт
Создадим скрипт php:
//get raw POST data so we can extract the email address
$data = file_get_contents("php://input");
preg_match("/\(.*?)\/", $data, $matches);
Переадресация с xml на php
Теперь настроим, чтобы наш веб-сервер переводил запросы xml на наш скрипт php. Открываем настройку нашего виртуального домена:
.
location = /autodiscover/autodiscover.xml rewrite ^/autodiscover/autodiscover.xml$ /autodiscover/autodiscover.php;
>
.
systemctl reload nginx
Теперь можно открывать Outlook и проверять автонастройку для других почтовых ящиков.
Управление службами автообнаружения
Вы можете выполнить Exchange ActiveSync и Outlook в анализаторе удаленного подключения Майкрософт. Если пользователь использует локализованную беспроводную сеть для подключения к Exchange, он должен выполнить оба теста, чтобы убедиться, что локализованная сеть позволяет подключаться к конечным точкам ActiveSync.
Вы можете получить помощь по планированию и развертыванию служб автооткрытия в рамках развертывания Exchange планирования и развертывания для Exchange Server.
The Autodiscover service minimizes user configuration and deployment steps by providing clients access to Exchange features. For Exchange Web Services (EWS) clients, Autodiscover is typically used to find the EWS endpoint URL. However, Autodiscover can also provide information to configure clients that use other protocols. Autodiscover works for client applications that are inside or outside firewalls and in resource forest and multiple forest scenarios.
Exchange 2016 introduced changes to services that were previously handled by the multiple servers. The Mailbox server now provides Client Access services, so you can't configure a standalone Client Access server like you could in previous versions of Exchange. Autodiscover service in Exchange 2016 and Exchange 2019 is possible because:
Exchange creates a virtual directory named autodiscover under the default web site in Internet Information Services (IIS).
Active Directory stores and provides authoritative URLs for domain-joined computers.
Client Access services on Mailbox servers provide authentication and proxy services for internal and external client connections.
Outlook configures services with only the username and password.
If you are a user looking for help with connecting your Outlook client to your Exchange server, see Outlook email setup.
1. Microsoft Outlook
С DNS все просто — создаем А- (или CNAME-) и SRV-записи. Пример таких записей в bind:
autodiscover IN A 111.111.111.111
* где 111.111.111.111 — IP-адрес на наш веб-сервер, который будет возвращать документ XML.
Этап 2. Проверка кандидатов
После создания упорядоченного списка потенциальных кандидатов следует проверить каждого из них, отправив запрос на URL-адрес и проверив результаты, как показано на рисунке 3. Когда вы получите успешный ответ, все готово!
Рисунок 3. Проверка кандидатов на конечные точки по порядку
Прежде чем отправлять запрос кандидату, убедитесь в его надежности. Помните, что вы отправляете учетные данные пользователя, поэтому важно убедиться, что вы сообщаете их только надежным серверам. Как минимум, следует убедиться:
что сертификат SSL, предоставленный сервером, действителен и поступил из надежного центра.
Это лишь базовые рекомендации по безопасности. Работая с проверкой подлинности, убедитесь, что ваш код соответствует требованиям к безопасности в вашей организации.
Тип отправляемого запроса зависит от того, как вы получаете доступ к службе автообнаружения.
Таблица 2. Типы запросов автообнаружения
Обзор процесса автообнаружения
Процесс автообнаружения состоит из трех основных этапов. На первом этапе создается список потенциальных серверов автообнаружения, а на втором вы проверяете каждый сервер в списке, пока (при благоприятном исходе) не будет получен успешный ответ. Если ни один из кандидатов не подошел, вы переходите к третьему этапу, который представляет последнюю попытку найти конечную точку автообнаружения.
Метод ExchangeService.AutodiscoverUrl в управляемом API EWS реализует все три этапа, поэтому при использовании управляемого API EWS вам не нужно беспокоиться о реализации автообнаружения. На следующем рисунке показаны три этапа процесса автообнаружения.
Рисунок 1. Три этапа процесса автообнаружения
Веб-сервер
В качестве примера, настройку выполним на веб-сервере NGINX, который работает на Linux. Если он не установлен, выполняем инсталляцию.
а) если сервер под CentOS / Red Hat:
yum install epel-release
yum install nginx
б) если сервер под Debian / Ubuntu:
apt-get install nginx
После разрешаем автозапуск и стартуем сервис:
systemctl enable nginx
systemctl start nginx
Затем создаем виртуальный домен:
error_page 405 =200 $uri;
>
Проверяем корректность настройки:
Если ошибок нет, перечитываем конфиг:
systemctl reload nginx
Создаем каталог, в котором будет наш XML:
mkdir -p /usr/share/nginx/html/autodiscover/autodiscover
Создадим сам XML:
* где из основных параметров на нужны:
- Type — тип протокола, используя который мы будем подключаться к почтовой системе.
- Server — сервер для подключения. Для каждого типа протокола может быть задан свой сервер или один и тот же.
- Port — порт, на котором слушает сервис. Как правило, для
- IMAP: 143, 993.
- POP: 110, 995.
- SMTP: 25, 465, 587.
2. Mozilla Thunderbird
Также, как с Outlook, необходимо настроить DNS и веб-сервер.
создаем А-запись (или CNAME). Пример в bind:
autoconfig IN A 111.111.111.111
* где 111.111.111.111 — IP-адрес на наш веб-сервер, который будет возвращать документ XML.
Службы автообнаружения в Outlook
Клиент Outlook может выполнять аутентификацию в Active Directory и искать объекты SCP автообнаружения, используя только учетные данные пользователя. После получения и перечисления экземпляров службы автообнаружения клиент подключается к службам клиентского доступа (интерфейсным) на первом сервере почтовых ящиков в перечисленном списке. Затем клиент собирает данные профиля в формате XML, необходимые для подключения к почтовому ящику пользователя и доступным компонентам Exchange.
Для доменного имени нужно настроить специальную запись DNS, которая указывает на сервер, предоставляющий службы автообнаружения, чтобы учетные записи Exchange корректно работали в Outlook. В случае внешнего доступа или при использовании DNS клиент находит службу автообнаружения в Интернете по основному адресу домена SMTP, входящему в электронный адрес пользователя.
Служба автообнаружения использует один из этих четырех методов для настройки почтового клиента. Первые два подходят для небольших организаций с одним пространством имен SMTP. Последние два предназначены для организаций с несколькими пространствами имен SMTP.
Поиск записи SRV DNS.
Одни имена узлов и URL-адреса можно настроить с помощью Центра администрирования Exchange (EAC) и командной консоли Exchange, а другие необходимо настраивать в PowerShell. Дополнительные сведения см. в статье Настройка потока обработки почты и клиентского доступа.
С помощью службы автообнаружения Outlook находит новую точку подключения на базе почтового ящика пользователя. То есть идентификатор автообнаружения состоит из GUID, символа @ и доменного имени из основного SMTP-адреса пользователя. Служба автообнаружения возвращает клиенту следующую информацию:
отображаемое имя пользователя;
индивидуальные параметры каждого внутреннего или внешнего подключения;
сведения о расположении почтового ящика пользователя (сервере почтовых ящиков, который содержит активную копию почтового ящика);
параметры сервера Мобильный Outlook.
Щелкните имя службы в приведенной выше таблице, чтобы узнать больше о том, как получить или обновить эти URL-адреса.
Когда информация пользователя в Exchange изменяется, Outlook автоматически обновляет профиль пользователя с помощью службы автообнаружения. Например, если почтовый ящик пользователя перемещен или клиент не может подключиться к почтовому ящику пользователя или доступным компонентам Exchange, Outlook связывается со службой автообнаружения и автоматически добавляет в профиль пользователя сведения, необходимые для подключения к почтовому ящику и компонентам Exchange.
Manage Autodiscover services
You can run the Exchange ActiveSync Autodiscover and Outlook Autodiscover tests in the Microsoft Remote Connectivity Analyzer. If the user is using a local wireless network to connect to Exchange, the user should run both tests to make sure that the local network allows for connections to the ActiveSync endpoints.
You can get help for planning and deploying Autodiscover services as part of your Exchange deployment in Planning and deployment for Exchange Server.
Служба автообнаружения Exchange позволяет клиентскому приложению с легкостью настроиться практически без участия пользователя. Большинство пользователей знают свои адрес электронной почты и пароль, и с помощью этих сведений вы можете получить все остальные сведения, необходимые для начала работы. Для клиентов веб-служб Exchange (EWS) автообнаружение обычно используется, чтобы найти URL-адрес конечной точки EWS, но служба автообнаружения также может предоставлять сведения для настройки клиентов, использующих другие протоколы. Автообнаружение работает с клиентскими приложениями как за брандмауэрами, так и за их пределами, и будет работать в сценариях с лесом ресурсов или несколькими лесами.
Other clients
Autodiscover service the preferred method to locate all services in Skype for Business Server 2015 . When a connection is successful, the Autodiscover service returns all the Web Services URLs for the user's home pool, including the Mobility Service (known as Mcx by the virtual directory created for the service in IIS), Lync Web App and Web scheduler URLs. However, both the internal Mobility Service URL and the external Mobility Service URL is associated with the external Web Services FQDN. Therefore, regardless of whether a mobile device is internal or external to the network, the device always connects to the Mobility Service externally through reverse proxy. The Autodiscover service also returns references to Internal/UCWA, External/UCWA and UCWA. These entries refer to the Unified Communications Web API (UCWA) web component.
Autodiscover services in Outlook
With only the user credentials, the Outlook client can authenticate to Active Directory and search for the Autodiscover SCP objects. After the client obtains and enumerates the instances of the Autodiscover service, the client connects to the Client Access (frontend) services on the first Mailbox server in the enumerated list. The client then collects the profile information in the form of XML data that's needed to connect to the user's mailbox and available Exchange features.
You need to set up a special DNS record for your domain name that points to the server providing Autodiscover services so that Exchange accounts function correctly in Outlook. For external access, or using DNS, the client locates the Autodiscover service on the Internet by using the primary SMTP domain address from the user's email address.
The Autodiscover service uses one of these four methods to configure the email client. The first two work for small, single SMTP namespace organizations. The last two serve multiple-SMTP namespaces.
Search for DNS SRV record
Some of the hostnames and URLs can be configured by using the Exchange admin center (EAC) and the Exchange Management Shell, while others require that you use PowerShell. You can learn more about that in Configure mail flow and client access.
Through the Autodiscover service, Outlook finds a new connection point made up of the user's mailbox. That is, Autodiscover uses the identification made up of a GUID, plus @, and the domain portion of the user's primary SMTP address. The Autodiscover service returns the following information to the client:
User's display name
Separate connection settings for internal and external connectivity
Location of the user's mailbox (the Mailbox server that currently holds the active copy of the mailbox)
URLs for various Outlook features that govern functionality such as free/busy information, Unified Messaging (UM) in Exchange 2016 (but not in Exchange 2019), and the offline address book (OAB)
Outlook Anywhere server settings
Click the Service name in the preceding table for more information about how to obtain or reconfigure these URLs.
When a user's Exchange information changes, Outlook uses the Autodiscover service to automatically reconfigure the user's profile. For example, if a user's mailbox is moved. or the client can't connect to the user's mailbox or to available Exchange features, Outlook will contact the Autodiscover service and automatically update the user's profile to include the information that's required to connect to the mailbox and Exchange features.
Другие клиенты
Выбирайте службу автообнаружения для поиска всех служб в Skype для бизнеса Server 2015. При успешном подключении она возвращает URL-адреса всех веб-служб в домашнем пуле пользователя, в том числе службы Mobility Service, или Mcx (так называется виртуальный каталог, создаваемый для службы в IIS), Lync Web App и веб-планировщика. Однако и внутренний, и внешний URL-адреса службы Mobility Service связаны с внешним полным доменным именем веб-служб. Поэтому мобильное устройство всегда подключается к службе Mobility Service извне, используя обратный прокси-сервер, независимо от того, является ли оно внешним по отношению к сети. Служба автообнаружения также возвращает ссылки на Internal/UCWA, External/UCWA и UCWA. UCWA это веб-компонент Unified Communications Web API.
Настройка служб автообнаружения
Автообнаружение работает как с защищенными, так и не защищенными брандмауэром клиентскими приложениями, подходит для сценариев с лесом ресурсов и несколькими лесами. В случае клиентов EWS служба автообнаружения обычно используется для поиска URL-адреса конечной точки EWS, но она также может предоставлять информацию для настройки клиентов, использующих другие протоколы.
При установке Exchange Server на сервере автоматически устанавливается самозаверяется сертификат, созданный и подписанный Exchange сервером. Однако вы также можете создать дополнительные самозаверяющие сертификаты для других служб.
Создание запроса на сертификат является первым шагом в установке нового сертификата на сервере Exchange для настройки шифрования безопасности транспортных слоев (TLS) для одной или нескольких Exchange служб. Такой запрос позволяет получить сертификат из центра сертификации (ЦС). Дополнительную информацию см. в следующих статьях:
Вы можете проверить службу автообнаружения с помощью средства Microsoft Remote Connectivity Analyzer. Протестировав подключение, также выберите параметр "Outlook Connectivity" (Подключение Outlook), чтобы выполнить соответствующую проверку. Если она не будет пройдена, возможно, вам потребуется настроить внешние URL-адреса в Exchange. Из результатов Microsoft Remote Connectivity Analyzer должно быть понятно, почему не удалось установить подключение. Как правило, ошибка подключения означает, что для виртуальных каталогов служб Outlook не настроены правильные внешние URL-адреса.
Autodiscover in DNS
Exchange introduced namespace requirements for Autodiscover in Exchange 2010 and certificates required several of them. In a server resilience scenario, all of these elements were required:
Primary datacenter IP namespace
Secondary datacenter IP namespace
Primary Outlook Web App failback namespace
Secondary Outlook Web App failback namespace
Transport namespace (for SMTP)
Primary datacenter RPC Client Access namespace
Secondary datacenter RPC Client Access namespace
Server resiliency scenarios have been improved, reducing the five namespaces to two. This is because Exchange no longer needs the RPC Client Access namespaces and Client Access services proxy requests to the Mailbox server that is hosting the active Mailbox database. A Mailbox server in one Active Directory site can proxy a session to a another Active Directory site's Mailbox server.
A typical CNAME record looks like this:
We recommend that you create an Autodiscover CNAME record for every domain on your account, including domain aliases and accepted domains. You need to create either a CNAME or SRV record where your domain is hosted. Only then you can synchronize your offline address book, show free/busy information and enable the Out of office feature in Outlook.
Service (SRV) resource records let you specify the location of the servers for a specific service, protocol, and DNS domain. For example, if you have two Web servers in your domain, you can create SRV resource records indicating which hosts serve as Web servers. Resolvers can then retrieve all the SRV resource records for the Web servers.
A typical SRV record looks like this:
Port Number: 443
Read more about CNAME and SRV records in the Exchange team blog, Namespace planning in Exchange 2016.
Configure Autodiscover services
Autodiscover works for client applications inside and outside firewalls and in resource forest and multiple forest scenarios. For EWS clients, Autodiscover is typically used to find the EWS endpoint URL, but Autodiscover can also provide information to configure clients that use other protocols.
When you install Exchange Server, a self-signed certificate that's created and signed by the Exchange server is automatically installed on the server. However, you can also create additional self-signed certificates that you can use for other services.
Creating a certificate request is the first step in installing a new certificate on an Exchange server to configure Transport Layer Security (TLS) encryption for one or more Exchange services. You use a certificate request (also known as a certificate signing request or CSR) to obtain a certificate from a certification authority (CA). For more information, see the following topics:
You can confirm your Autodiscover service by using the Microsoft Remote Connectivity Analyzer. When the connectivity is successful, also select and run the Outlook Connectivity test. If that fails, you may need to configure the external URLs in Exchange. The results from the Microsoft Remote Connectivity Analyzer should explain why connectivity failed. Generally, a connectivity failure means that you don't have the correct external URLs configured for the virtual directories of the various Outlook services.
3. DNS SRV
Это метод, призванный быть универсальным. Более того, он описан стандартом RFC.
Суть заключается в создании SRV-записей в DNS. Данная запись создается по следующему синтаксису:
- — имя сервиса (например, imap).
- — сетевой протокол (TCP, UDP, TLS).
- — порядок, в котором идет учет строки.
- — если приоритеты совпадают у служб, порядок определяется по их весу.
- — порт, на котором слушает служба.
- — имя сервера, на который будет вести запись.
Пример записей для настройки почты:
* в данном примере мы отдаем приоритет более защищенным средствам подключения (smtps, imaps, pop3s).
Пример записей в DNS Bind:
Служба автообнаружения минимизирует действия по настройке и развертыванию пользователей, предоставляя клиентам доступ к функциям Exchange. Для клиентов веб-служб Exchange (EWS) автообнаружение обычно используется, чтобы найти URL-адрес конечной точки EWS. Однако служба автообнаружения также может предоставлять сведения для настройки клиентов, использующих другие протоколы. Автообнаружение работает как с защищенными, так и не защищенными брандмауэром клиентскими приложениями, подходит для сценариев с лесом ресурсов и несколькими лесами.
Exchange 2016 г. были внесены изменения в службы, которые ранее обрабатывались несколькими серверами. Теперь сервер почтовых ящиков предоставляет службы клиентского доступа, поэтому вы не сможете настроить отдельный сервер клиентского доступа, как в предыдущих версиях Exchange. Служба автооткрытия Exchange 2016 и Exchange 2019 г., поскольку:
Exchange создает виртуальный каталог autodiscover , названный под веб-сайтом по умолчанию в службы IIS (IIS).
Active Directory сохраняет и предоставляет авторитетные URL-адреса для компьютеров с доменом.
Службы клиентского доступа на серверах почтовых ящиков предоставляют проверку подлинности и прокси-службы для внутренних и внешних клиентских подключений.
Outlook настраивает службы только с иным и иным и паролем.
Справочные сведения для пользователей, касающиеся подключения клиента Outlook к серверу Exchange Server, см. в статье о настройке электронной почты Outlook.
Автообнаружение в DNS
Exchange в 2010 г. были введены требования к пространству имен для автооткрытия Exchange, и для сертификатов требовалось несколько из них. В сценарии устойчивости сервера все эти элементы были необходимы:
Основное пространство имен IP центра обработки данных.
Дополнительное пространство имен IP центра обработки данных.
Основное Outlook Web App пространство имен с отбойным сбойом
Дополнительное Outlook Web App пространство имен с отбойным сбойом
Пространство имен транспорта (для SMTP)
Основное пространство имен для клиентского доступа через RPC, которое нужно центру обработки данных.
Дополнительное пространство имен для клиентского доступа через RPC, которое нужно центру обработки данных.
Улучшены сценарии устойчивости серверов, что сокращает пять пространств имен до двух. Причина состоит в том, что Exchange больше не нужны пространства имен для клиентского доступа через RPC, а службы клиентского доступа перенаправляют запросы на сервер почтовых ящиков, на котором размещается активная база данных почтовых ящиков. Сервер почтовых ящиков на одном сайте Active Directory может перенаправлять сеанс на сервер почтовых ящиков другого сайта Active Directory.
Типичная запись CNAME выглядит указанным ниже образом.
Срок жизни: 3600 с.
Тип записи ресурса: CNAME.
Рекомендуем создать записи CNAME автообнаружения для всех доменов учетной записи, в том числе псевдонимов доменов и обслуживаемых доменов. Запись SRV или CNAME необходимо создать там, где размещается ваш домен. Только после этого вы можете синхронизировать свою офлайн-адресную книгу, показать сведения о свободном или загруженном доступе и включить функцию Out of office в Outlook.
Записи SRV позволяют указать расположение серверов для определенной службы, протокола и домена DNS. Например, если в вашем домене два веб-сервера, вы можете создать записи SRV, указывающие, какие узлы выполняют функции веб-серверов. Сопоставители затем могут извлечь все записи SRV для веб-серверов.
Типичная запись SRV выглядит указанным ниже образом.
Номер порта: 443.
Дополнительные данные о записях CNAME и SRV в блоге Exchange, планировании пространства имен в Exchange 2016 г.
Autodiscover services and Active Directory
Exchange stores in Active Directory the configuration of Exchange servers in the organization as well as information about your users' mailboxes. Before you install Exchange Server, you need to prepare your Active Directory forest and its domains. If you aren't familiar with Exchange forests or domains, see Step 3: Prepare Active Directory domains.
Exchange automatically creates at installation the virtual directory autodiscover in IIS, the frontend Client Access services web site that clients connect to. This allows Outlook to discover the Exchange mailbox settings so that users don't have to deal with manually configuring advanced settings.
The SCP object is also created in Active Directory at the same time as the Autodiscover service virtual directory. The SCP stores and provides authoritative URLs of the Autodiscover service for domain-joined computers.
You need to update the SCP object to point to the Exchange server. This is necessary because Exchange servers provide additional Autodiscover information to clients to improve the discovery process. You can use the Set-ClientAccessService cmdlet to update the SCP object. For more information, see Set-ClientAccessService.
You need to be assigned permissions before you can run the Set-ClientAccessService cmdlet. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.
Autodiscover makes it easy to retrieve the information that you need to connect to mailboxes on Exchange servers. SCP objects locate those Autodiscover servers or endpoints appropriate for the user you're retrieving settings for. And SCP objects in AD DS provide an easy way for domain-joined clients to look up Autodiscover servers.
Exchange publishes two types of SCP objects for the Autodiscover service:
SCP pointers: Contains information that points to specific LDAP servers that should be used to locate Autodiscover SCP objects for the user's domain. SCP pointers are stamped with the following GUID: 67661d7F-8FC4-4fa7-BFAC-E1D7794C1F68.
SCP URLs: Contains URLs for Autodiscover endpoints. SCP URLs are stamped with the following GUID: 77378F46-2C66-4aa9-A6A6-3E7A48B19596
The SCP object contains the authoritative list of Autodiscover service URLs for the forest. To learn more about locating Autodiscover service endpoints, see Generate a list of Autodiscover endpoints.
Depending on whether you configured the Autodiscover service on a separate site, the Autodiscover service URL will be either of the following values, where // is the primary SMTP domain address:
For more information about SCP objects, see Publishing with Service Connection Points.
Autodiscover in DNS
Exchange introduced namespace requirements for Autodiscover in Exchange 2010 and certificates required several of them. In a server resilience scenario, all of these elements were required:
Primary datacenter IP namespace
Secondary datacenter IP namespace
Primary Outlook Web App failback namespace
Secondary Outlook Web App failback namespace
Transport namespace (for SMTP)
Primary datacenter RPC Client Access namespace
Secondary datacenter RPC Client Access namespace
Server resiliency scenarios have been improved, reducing the five namespaces to two. This is because Exchange no longer needs the RPC Client Access namespaces and Client Access services proxy requests to the Mailbox server that is hosting the active Mailbox database. A Mailbox server in one Active Directory site can proxy a session to a another Active Directory site's Mailbox server.
A typical CNAME record looks like this:
We recommend that you create an Autodiscover CNAME record for every domain on your account, including domain aliases and accepted domains. You need to create either a CNAME or SRV record where your domain is hosted. Only then you can synchronize your offline address book, show free/busy information and enable the Out of office feature in Outlook.
Service (SRV) resource records let you specify the location of the servers for a specific service, protocol, and DNS domain. For example, if you have two Web servers in your domain, you can create SRV resource records indicating which hosts serve as Web servers. Resolvers can then retrieve all the SRV resource records for the Web servers.
A typical SRV record looks like this:
Port Number: 443
Read more about CNAME and SRV records in the Exchange team blog, Namespace planning in Exchange 2016.
Службы автообнаружения и Active Directory
Exchange Active Directory хранит конфигурацию Exchange серверов в организации, а также сведения о почтовых ящиках пользователей. Перед установкой Exchange Server необходимо подготовить лес Active Directory и его домены. Если вы не знакомы с Exchange или доменами, см. в шаге 3. Подготовка доменов Active Directory.
Exchange автоматически создает autodiscover при установке виртуальный каталог в IIS, веб-сайте frontend client Access services, к который подключаются клиенты. Это позволяет Outlook обнаруживать параметры почтовых ящиков Exchange, чтобы пользователям не приходилось вручную настраивать дополнительные параметры.
Одновременно с виртуальным каталогом службы автообнаружения в Active Directory создается объект точки подключения службы (SCP). Он хранит и предоставляет заслуживающие доверия URL-адреса службы автообнаружения для компьютеров, присоединенных к домену.
Вам нужно обновить объект SCP, чтобы он указывал на сервер Exchange. Это требуется потому, что серверы Exchange предоставляют клиентам дополнительные сведения автообнаружения для улучшения процесса обнаружения. Дополнительные сведения см. в статье Set-ClientAccessService.
Для запуска командлета Set-ClientAccessService требуются специальные разрешения. Сведения о необходимых разрешениях для запуска командлетов и использования параметров в организации см. в статье Find the permissions required to run any Exchange cmdlet.
Автообнаружение упрощает получение информации, необходимой для подключения к почтовым ящикам на серверах Exchange Server. Объекты SCP находят подходящие серверы или конечные точки автообнаружения для пользователей, для которых вы получаете параметры. Объекты SCP в AD DS упрощают поиск серверов автообнаружения для присоединенных к домену клиентов.
Exchange публикует два типа объектов SCP для службы автообнаружения:
Указатели SCP. Содержит сведения, указыватели на определенные серверы LDAP, которые необходимо использовать для поиска объектов SCP автооткрытки для домена пользователя. GUID указателей SCP: 67661d7F-8FC4-4fa7-BFAC-E1D7794C1F68.
URL-адреса SCP. Содержит URL-адреса для конечных точек автооткрытия. URL-адреса SCP штампуются с помощью следующего GUID: 77378F46-2C66-4aa9-A6A6-3E7A48B19596
Объект SCP содержит заслуживающий доверия список URL-адресов службы автообнаружения для леса. Дополнительные сведения о поиске конечных точек службы автообнаружения см. в статье Как создать список конечных точек службы автообнаружения.
В зависимости от настройки службы автооткрытия на отдельном сайте URL-адрес службы автооткрытия будет одним из следующих значений, // где находится основной домен SMTP:
Дополнительные сведения об объектах SCP см. в публикации с точками подключения к службе.
Other clients
Autodiscover service the preferred method to locate all services in Skype for Business Server 2015 . When a connection is successful, the Autodiscover service returns all the Web Services URLs for the user's home pool, including the Mobility Service (known as Mcx by the virtual directory created for the service in IIS), Lync Web App and Web scheduler URLs. However, both the internal Mobility Service URL and the external Mobility Service URL is associated with the external Web Services FQDN. Therefore, regardless of whether a mobile device is internal or external to the network, the device always connects to the Mobility Service externally through reverse proxy. The Autodiscover service also returns references to Internal/UCWA, External/UCWA and UCWA. These entries refer to the Unified Communications Web API (UCWA) web component.
Configure Autodiscover services
Autodiscover works for client applications inside and outside firewalls and in resource forest and multiple forest scenarios. For EWS clients, Autodiscover is typically used to find the EWS endpoint URL, but Autodiscover can also provide information to configure clients that use other protocols.
When you install Exchange Server, a self-signed certificate that's created and signed by the Exchange server is automatically installed on the server. However, you can also create additional self-signed certificates that you can use for other services.
Creating a certificate request is the first step in installing a new certificate on an Exchange server to configure Transport Layer Security (TLS) encryption for one or more Exchange services. You use a certificate request (also known as a certificate signing request or CSR) to obtain a certificate from a certification authority (CA). For more information, see the following topics:
You can confirm your Autodiscover service by using the Microsoft Remote Connectivity Analyzer. When the connectivity is successful, also select and run the Outlook Connectivity test. If that fails, you may need to configure the external URLs in Exchange. The results from the Microsoft Remote Connectivity Analyzer should explain why connectivity failed. Generally, a connectivity failure means that you don't have the correct external URLs configured for the virtual directories of the various Outlook services.
Manage Autodiscover services
You can run the Exchange ActiveSync Autodiscover and Outlook Autodiscover tests in the Microsoft Remote Connectivity Analyzer. If the user is using a local wireless network to connect to Exchange, the user should run both tests to make sure that the local network allows for connections to the ActiveSync endpoints.
You can get help for planning and deploying Autodiscover services as part of your Exchange deployment in Planning and deployment for Exchange Server.
Этап 1. Определение пула кандидатов
Прежде чем использовать службу автообнаружения, необходимо найти подходящий сервер автообнаружения для пользователя. К счастью, служба автообнаружения задает ограниченное количество мест для поиска. Если найдено несколько кандидатов, служба автообнаружения также определяет способ создания и сортировки списка по приоритету.
Таблица 1. Источники кандидатов на конечную точку автообнаружения
На следующем рисунке показано, как создать список конечных точек автообнаружения.
Рисунок 2. Процесс создания списка конечных точек автообнаружения
Варианты использования автообнаружения
Вы можете получить доступ к службе автообнаружения с помощью веб-службы SOAP или POX. Выбор метода зависит от ваших требований и среды. Тем не менее, мы рекомендуем по возможности использовать веб-службу SOAP. Кроме того, можно использовать управляемый API EWS. Он реализует часть клиента в службах автообнаружения SOAP и POX.
Таблица 3: Варианты доступа к службе автообнаружения
Использует службы автообнаружения SOAP и POX.
Работает с Exchange Online, Exchange Online в составе Office 365 и всеми версиями Exchange, начиная с Exchange 2007 с пакетом обновления 1 (SP1).
The Autodiscover service minimizes user configuration and deployment steps by providing clients access to Exchange features. For Exchange Web Services (EWS) clients, Autodiscover is typically used to find the EWS endpoint URL. However, Autodiscover can also provide information to configure clients that use other protocols. Autodiscover works for client applications that are inside or outside firewalls and in resource forest and multiple forest scenarios.
Exchange 2016 introduced changes to services that were previously handled by the multiple servers. The Mailbox server now provides Client Access services, so you can't configure a standalone Client Access server like you could in previous versions of Exchange. Autodiscover service in Exchange 2016 and Exchange 2019 is possible because:
Exchange creates a virtual directory named autodiscover under the default web site in Internet Information Services (IIS).
Active Directory stores and provides authoritative URLs for domain-joined computers.
Client Access services on Mailbox servers provide authentication and proxy services for internal and external client connections.
Outlook configures services with only the username and password.
If you are a user looking for help with connecting your Outlook client to your Exchange server, see Outlook email setup.
Autodiscover services in Outlook
With only the user credentials, the Outlook client can authenticate to Active Directory and search for the Autodiscover SCP objects. After the client obtains and enumerates the instances of the Autodiscover service, the client connects to the Client Access (frontend) services on the first Mailbox server in the enumerated list. The client then collects the profile information in the form of XML data that's needed to connect to the user's mailbox and available Exchange features.
You need to set up a special DNS record for your domain name that points to the server providing Autodiscover services so that Exchange accounts function correctly in Outlook. For external access, or using DNS, the client locates the Autodiscover service on the Internet by using the primary SMTP domain address from the user's email address.
The Autodiscover service uses one of these four methods to configure the email client. The first two work for small, single SMTP namespace organizations. The last two serve multiple-SMTP namespaces.
Search for DNS SRV record
Some of the hostnames and URLs can be configured by using the Exchange admin center (EAC) and the Exchange Management Shell, while others require that you use PowerShell. You can learn more about that in Configure mail flow and client access.
Through the Autodiscover service, Outlook finds a new connection point made up of the user's mailbox. That is, Autodiscover uses the identification made up of a GUID, plus @, and the domain portion of the user's primary SMTP address. The Autodiscover service returns the following information to the client:
User's display name
Separate connection settings for internal and external connectivity
Location of the user's mailbox (the Mailbox server that currently holds the active copy of the mailbox)
URLs for various Outlook features that govern functionality such as free/busy information, Unified Messaging (UM) in Exchange 2016 (but not in Exchange 2019), and the offline address book (OAB)
Outlook Anywhere server settings
Click the Service name in the preceding table for more information about how to obtain or reconfigure these URLs.
When a user's Exchange information changes, Outlook uses the Autodiscover service to automatically reconfigure the user's profile. For example, if a user's mailbox is moved. or the client can't connect to the user's mailbox or to available Exchange features, Outlook will contact the Autodiscover service and automatically update the user's profile to include the information that's required to connect to the mailbox and Exchange features.
Веб-сервер
Настраивая autodiscovery для Microsoft, мы уже настроили веб-сервер NGINX. Теперь нужно добавить виртуальный домен и создать соответствующий документ.
Откроем уже созданный нами файл конфигурации:
. и добавим в него:
Создаем каталог для хранения XML:
mkdir -p /usr/share/nginx/html/autodiscover/mail
- hostname — имя сервера для подключения. Для каждого типа протокола может быть задан свой сервер или один и тот же.
- port — порт, на котором слушает сервис. Как правило, для
- IMAP: 143, 993.
- POP: 110, 995.
- SMTP: 25, 465, 587.
- plain — без шифрования.
- SSL — SSL или TLS шифрование на отдельном порту (465, 993, 995).
- STARTTLS — TLS шифрование через STARTTLS на обычном порту.
Читайте также: