从 Exchange 电子邮件地址获取自动发现 URL

发布于 2024-08-31 02:34:54 字数 2381 浏览 4 评论 0原文

我从 Exchange 2007 服务器的地址开始:

[email protected]

并且我尝试发送自动发现请求,如 MSDN

我尝试使用 TechNet White 中记录的通用自动发现地址纸

因此,在 PHP 上使用 curl,我

<Autodiscover 
 xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
   <Request>
     <EMailAddress>[email protected]</EMailAddress>
     <AcceptableResponseSchema>
       http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
    </AcceptableResponseSchema>
   </Request>
 </Autodiscover>

向以下 URL 发送了以下请求:

https://domain.exchangeserver.org/autodiscover/autodiscover.xml

但没有得到响应,只是最终超时。

我也尝试过:

https://autodiscover.domain.exchangeserver.org/autodiscover/autodiscover.xml

结果相同。

现在,由于我的更大目标是将自动发现与 Exchange Web 服务结合使用,并且由于所有 EWS URL 通常使用与 Outlook Web Access 地址相同的子域,因此我想看看自动发现 URL 是否也是如此。由于 OWA URL 是:

OWA:  https://wmail.domain.exchangeserver.org

我尝试过:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

果然,我得到了预期的响应。

但是,我只知道 OWA 子域,因为它是我可以访问的服务器,并且我用它来测试所有内容。如果这是一个实时应用程序并且用户正在输入自己的 Exchange 电子邮件,我将无法确定或无法猜测它。

我知道自动发现设置必须在不知道 OWA URL 的情况下可用,因为我可以

[email protected]

在 Snow Leopard 上输入:进入 Apple Mail,它会毫不费力地找到所有内容。

所以问题是...

  1. https://domain.exchangeserver.org/autodiscover/autodiscover.xml 应该有效吗,而我在尝试连接它时错过了一个步骤?或者,

  2. 是否有一些技巧(可能涉及 ping 电子邮件地址?),Apple Mail 和其他客户端在发送自动发现请求之前使用这些技巧将地址解析为 OWA 子域?

感谢任何知道或可以大胆猜测的人。

I'm starting with an address for an Exchange 2007 server:

[email protected]

And I attempted to send an autodiscover request, as documented at MSDN.

I attempted to use the generic autodiscover address documented at the TechNet White Paper.

So, using curl on PHP, I sent the following request:

<Autodiscover 
 xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
   <Request>
     <EMailAddress>[email protected]</EMailAddress>
     <AcceptableResponseSchema>
       http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a
    </AcceptableResponseSchema>
   </Request>
 </Autodiscover>

to the following URL:

https://domain.exchangeserver.org/autodiscover/autodiscover.xml

But got no response, just an eventual timeout.

I also tried:

https://autodiscover.domain.exchangeserver.org/autodiscover/autodiscover.xml

With the same result.

Now, since my larger goal is to use Autodiscover with Exchange Web Services, and since all of the EWS URLs typically use the same sub-domain as the Outlook Web Access address, I thought I'd see if the same were true for autodiscovery URLS. Since the OWA URL is:

OWA:  https://wmail.domain.exchangeserver.org

I tried:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

And sure enough, I got back the expected response.

However, I only knew the OWA sub-domain because it's the server I have access to and that I'm using to test everything. I would not know it for sure or be able to guess it if this were a live app and the user was entering in their own Exchange email.

I know that the autodiscover settings must be available without knowing the OWA URL, because I can enter:

[email protected]

into Apple Mail on Snow Leopard and it finds everything without trouble.

So the question is...

  1. Should https://domain.exchangeserver.org/autodiscover/autodiscover.xml have worked, and I just missed a step when trying to connect to it? Or,

  2. Is there some trick (maybe involving pinging the email address?) that Apple Mail and other clients use to resolve the address to the OWA subdomain before sending the autodiscover request?

Thanks to anyone who knows or can take a wild guess.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩动你心 2024-09-07 02:34:54

经过一番与 Google 的较量后,我在 MSDN 上发现了以下非常有用的文章:

http://msdn.microsoft.com/en-us/library/ee332364.aspx

特别是“调用自动发现”部分< /code>

我仍在尝试弄清楚如何通过 LDAP 进行 Active Directory 服务连接点搜索,但步骤 4(至少对于我的服务器而言)非常有效:

应用程序发送一个未经身份验证的 GET 请求 http://autodiscover.contoso.com/autodiscover/autodiscover.xml 。 (请注意,这是一个非 SSL 端点)。

如果 GET 请求返回 302 重定向响应,则它会获取
来自位置 HTTP 的重定向 URL
标头,并按描述验证它
在“验证
潜在不安全的重定向 URL”
本文稍后会介绍。

果然,请求发送到:

http://domain.exchangeserver.org/autodiscover/autodiscover.xml

发送回 302 重定向 URL:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

但本文给出了一系列步骤,因此任何想要为 Exchange 客户端实现自动发现的人在放弃之前都需要尝试 5 件事。

After a bit more banging my head against the Google, I found the following very helpful article on MSDN:

http://msdn.microsoft.com/en-us/library/ee332364.aspx

Specifically the section "Calling Autodiscover"

I'm still trying to figure out how to do a Active Directory Service Connection Point search via LDAP, but step 4, for my server at least, worked like a charm:

The application sends an unauthenticated GET request to http://autodiscover.contoso.com/autodiscover/autodiscover.xml. (Note that this is a non-SSL endpoint).

If the GET request returns a 302 redirect response, it gets the
redirection URL from the Location HTTP
header, and validates it as described
in the section “Validating a
Potentially Unsafe Redirection URL”
later in this article.

Sure enough, a request sent to:

http://domain.exchangeserver.org/autodiscover/autodiscover.xml

sent back a 302 redirect URL:

https://wmail.domain.exchangeserver.org/autodiscover/autodiscover.xml

But this article gives a series of steps, so anyone wanting to implement autodiscover for an Exchange client has 5 things to try before giving up.

魔法唧唧 2024-09-07 02:34:54

我也面临类似的问题
我得到的错误是
自动发现阻止了到 https://autodiscover.uhc.com/autodiscover/ 的潜在不安全重定向autodiscover.xml

我已将我的作业迁移到更新版本的 dotnet(8.0)和类似的其他兼容 ef core 版本,但 Microsoft.Exchange.WebServices.dll 仍然是 2.2.0 版本,我不确定是否这就是导致问题的原因

I am also facing a similar kind of issue
the error i am getting is
Autodiscover blocked a potentially insecure redirection to https://autodiscover.uhc.com/autodiscover/autodiscover.xml

i have migrated my Job to newer version of dotnet that is 8.0 and similarly other compatible ef core versions but Microsoft.Exchange.WebServices.dll is still 2.2.0 version i am not sure if this what causing the issue

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文