可以使用 JavaMail 和 Apache Camel Mail (IMAP) 通过服务帐户连接 Microsoft Exchange 共享邮箱吗? [英] Possible to connect with a Microsoft Exchange shared mailbox via service account using JavaMail and Apache Camel Mail (IMAP)?

查看:45
本文介绍了可以使用 JavaMail 和 Apache Camel Mail (IMAP) 通过服务帐户连接 Microsoft Exchange 共享邮箱吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用 Apache Camel 通过 IMAP 连接到我们的收件箱.Apache Camel Mail 组件建立在 JavaMail 之上.

We are using Apache Camel to connect via IMAP to our inbox. The Apache Camel Mail components are build on JavaMail.

我们的测试服务器使用 Outlook 和 Office 365.我们使用 Outlook.office365.com 作为主机/域,个人用户的电子邮件帐户是用户名等及其密码.考虑到凭据是连接到其个人收件箱的注册个人用户的凭据,这很有效.

Our testing server is using Outlook and Office 365. We are using outlook.office365.com as the host/domain and a personal user's email account is the username and so forth with their password. This works well, considering the credentials are those of a registered personal user connecting to their individual inbox.

<from uri=imaps:outlook.office.365.com:993?username=un@domain.com&password=blah/>

生产服务器是一个共享邮箱,我们在其中设置了一个服务帐户.理想情况下,此服务帐户将充当邮箱的用户".没有附加到邮箱的实际用户".我们希望使用服务帐户用户名作为un"字段和帐户密码以获取访问权限.

The production server is a shared mailbox where we have a service account set up. This service account will ideally act as the 'user' of the mailbox. There is not an 'actual user' attached to the mailbox. We are hoping to use the service account username as the 'un' field and the password for the account to gain access.

<from uri=imaps:host-domain:993?username=ServiceAccuntUN&password=ServiceAccountPW/>

或者

<from uri=imaps:sharedmailbox@domain.com:993?username=ServiceAccuntUN&password=ServiceAccountPW/>

或者

<from uri=imaps:domain:993?username=sharedmailbox@domain.com/ServiceAccuntUN&password=ServiceAccountPW/>

有人想分享使用 Microsoft Exchange 服务帐户访问共享邮箱的任何经验吗?我不应该认为这是一个 Microsoft Exchange 2010 服务器.

Does anybody have any experiences they would like to share using Microsoft Exchange Service Accounts to access shared mailboxes? I should not that this is a Microsoft Exchange 2010 Server.

推荐答案

作为记录,连接 Apache Camel 组件的工作方式与典型的 Exchange 2010 登录相同.

For the record, connecting with the Apache Camel component works the same as the typical Exchange 2010 login.

用户名属性应该是:DOMAIN\SERVICE_ACCOUNT\SHARED_MAILBOX_ALIAS

The username property should be: DOMAIN\SERVICE_ACCOUNT\SHARED_MAILBOX_ALIAS

密码应该是服务帐户的密码.

The password should be that of the service account.

我们发现 JavaMail 和 Apache Camel Mail 在我们的用例中非常可靠.

We have found JavaMail and Apache Camel Mail to be very reliable in our use case.

(有关更多信息,请参阅上面的评论)

(for additional info, see the comments above)

这篇关于可以使用 JavaMail 和 Apache Camel Mail (IMAP) 通过服务帐户连接 Microsoft Exchange 共享邮箱吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆