Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting with UPN to shared mailbox #35

Open
kevinm90 opened this issue Nov 27, 2017 · 6 comments
Open

Connecting with UPN to shared mailbox #35

kevinm90 opened this issue Nov 27, 2017 · 6 comments

Comments

@kevinm90
Copy link

kevinm90 commented Nov 27, 2017

Hi everyone,

I am having issues connecting to a shared mailbox on Exchange Server 2016.
In outlook I can connect via serviceaccount@domain/mailboxname as username (which is the universal principal name approach in Exchange).
Unfortunately this doesn't work in the plugin, I always receive

Error : javax.mail.AuthenticationFailedException: AUTHENTICATE failed.
at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:660)
at javax.mail.Service.connect(Service.java:295)
at javax.mail.Service.connect(Service.java:176)
at org.jenkinsci.plugins.pollmailboxtrigger.mail.MailReader.connect(MailReader.java:58)

Server configuration

Jenkins Version: 2.73.2
Plugin Version: 1.026

Any tips here how to resolve this?

Thanks and regards
Kevin

PS: Connection to my normal user-inbox is working without any issues so far

@nickgrealy
Copy link

Hi @kevinm90 ,

Thanks for raising the issue. I don't actually have any experience with Exchange Server 2016, so I can't help with that. Also, you've skipped some steps when creating the new issue:

  • Can you please provide all the configuration details you're using (hide sensitive fields) and any other information which may help? (does it match the examples here?)
  • Do you know if you're you able to connect to to your mail server via IMAP? (i.e. Can you independently test/connect via another IMAP mail client?)
  • Have you followed the troubleshooting section on the plugin page? (There's a section there for the very error you're having. Have you tried different credentials?)

Thanks, let me know how you go.

Kind regards,
Nick

@kevinm90
Copy link
Author

Hi Nick,

Can you please provide all the configuration details you're using (hide sensitive fields) and any other information which may help? (does it match the examples here?)

the complete config looks like this:
host=imap.my.company.domain
username=[email protected]\mailboxname

folder=Inbox
subjectContains=
receivedXMinutesAgo=40000

mail.imaps.port=993
mail.imap.ssl.enable=true
mail.imap.starttls.enable=true

So, yes it matches the example for Exchange 2013 (also it works with my personal mailbox)

Do you know if you're you able to connect to to your mail server via IMAP? (i.e. Can you independently test/connect via another IMAP mail client?)

Yes, with Outlook 2016 it is working perfectly (I configured a manual imap-connection and didn't use the automatic exchange-config-option)

Have you followed the troubleshooting section on the plugin page? (There's a section there for the very error you're having. Have you tried different credentials?)

Yes, I also tried another service-user and another shared mailbox.
As I said, a personal mailbox is working, but for all central mailboxes (where I have to use the UPN-approach as username) it isn't.

Do I have to escape or encode a character in the username. e.g. the @-sign or the backslash?
I already tried with double backslash, but without any luck.

Regards
Kevin

@kevinm90 kevinm90 reopened this Nov 27, 2017
@nickgrealy
Copy link

Hi @kevinm90 ,

Unfortunately I haven't found a solution, and don't have access to a Exchange Server 2016 instance to reproduce the issue.

I'll leave this issue open, in the hopes that someone else will be able to help resolve the problem.

Kind regards,
Nick

@nickgrealy
Copy link

#45 - perhaps this issue will be resolved by implementing EWS2.0 API?

@sumit-global
Copy link

sumit-global commented Oct 9, 2018

@kevinm90 what exactly you mean by domain \mailboxname

@kevinm90
Copy link
Author

@sumit-global I mean the name/ID of the shared mailbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants