2
votes

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

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:[email protected]&password=blah/>

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/>

Or

<from uri=imaps:[email protected]:993?username=ServiceAccuntUN&password=ServiceAccountPW/>

Or

<from uri=imaps:domain:[email protected]/ServiceAccuntUN&password=ServiceAccountPW/>

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.

2
Thanks @BillShannon for the link. This is actually one of the articles I am keeping in my backpocket when I can attempt connectivity. I am almost 100% certain that the Service Account will need 'Full Access' permissions to the mailbox in order to receive messages via imap. Here is another good article for your records...ingogegenwarth.wordpress.com/2016/04/11/…ClickerTweeker
Thanks for the pointer. I added a link to the JavaMail Exchange web page.Bill Shannon

2 Answers

1
votes

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

The username property should be: DOMAIN\SERVICE_ACCOUNT\SHARED_MAILBOX_ALIAS

The password should be that of the service account.

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

(for additional info, see the comments above)

-1
votes

witch version of javamail? for me DOMAIN\SERVICE_ACCOUNT\SHARED_MAILBOX_ALIAS is ok until 1.4.2 version, from 1.4.3 it does not connect