Exchange Online (Office365) email issues?

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Exchange Online (Office365) email issues?

Post by mushu »

Mantis: 2.24.3
Email Reporting 0.10.1
Windows Server 2012R2, IIS 8

Does anyone have any hints or tricks for getting mantis to work to grab emails from an inbox and process them as tickets under Office 365? We recently converted over to "the cloud" (ugh) and having problems now getting the EmailReporting plugin to be able to login to the account inbox to grab messages via POP3 protocol. I've got our network folks working on it, but wondering if anyone else has had and/or solved this issue.

Thanks!
SL-Gundam
Posts: 667
Joined: 06 Jul 2011, 14:17

Re: Exchange Online (Office365) email issues?

Post by SL-Gundam »

EmailReporting has no support for mfa/2FA so disable for the mailbox in question or use app passwords
Office365 allows disabling protocols on a per mailbox basis. Check whether the POP3 protocol is turned on for the mailbox in question.

https://support.microsoft.com/en-us/off ... 6c4ac95353
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Re: Exchange Online (Office365) email issues?

Post by mushu »

Yes, I've ensured that POP is enabled on the account. I still get the following TEST results:

Code: Select all

Operation NOT successful

Description: UserName mailbox
Mailbox type: POP3
Hostname: tlsv1.2://outlook.office365.com
TCP port (optional): 995
Connection encryption: TLSv1.2
Verify SSL certificate: 0
Username: UserName@my.domain.com
Password: ******
Authentication method: USER

Location: Attempt login
[pear_error: message="-ERR Logon failure: unknown user name or bad password." code=-1 mode=return level=notice prefix="" info=""]
I have tried all possible authentication methods in the dropdown and all possible connection encryptions in the dropdown, with the same results.

I have also tried to do the debug settings in config file but that doesn't log anything *until* the connection is made, so i can't see any of the actual server responses while it is trying to authenticate. Hoping someone has more clues for me on this, it is very frustrating (yes, I know this is not the fault of Mantis or the EmailReporting plugin.)
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Re: Exchange Online (Office365) email issues?

Post by mushu »

devbugs-exch-settings.PNG
devbugs-exch-settings.PNG (90.45 KiB) Viewed 370 times
SL-Gundam
Posts: 667
Joined: 06 Jul 2011, 14:17

Re: Exchange Online (Office365) email issues?

Post by SL-Gundam »

Mine looks like this
Don't know why you are using TLS. Especially since Microsoft is stopping support for it

Ignore the "Verify SSL certificate" and leave it off during testing. It's a bitch on windows to turn on

Code: Select all

Operation successful

Description: mantis-bug-tracker
Mailbox type: POP3
Hostname: ssl://outlook.office365.com
TCP port (optional): 995
Connection encryption: SSL
Verify SSL certificate: 1
Username: Mantis@domain.com
Password: ******
Authentication method: USER
Weird things like this i usually test with an actual email client. If you can get the mailbox working with the same information your are giving EmailReporting then it should work.
Please also be careful with copy paste for passwords. It's very easy to accidentally include an extra space
SL-Gundam
Posts: 667
Joined: 06 Jul 2011, 14:17

Re: Exchange Online (Office365) email issues?

Post by SL-Gundam »

mushu wrote: 04 Mar 2021, 16:43 devbugs-exch-settings.PNG
Are these for the Office365 tenant or for the mailbox in question?
I'm asking because that looks a little bit different for me
Attachments
Untitled.png
Untitled.png (15.22 KiB) Viewed 361 times
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Re: Exchange Online (Office365) email issues?

Post by mushu »

I thought TLS 1.2 was the latest encryption MS is using? Perhaps I'm confusing HTTP with this though...

So I made my settings match yours, and carefully retyped the password, and still get this:

Code: Select all

Operation NOT successful

Description: UserName mailbox
Mailbox type: POP3
Hostname: ssl://outlook.office365.com
TCP port (optional): 995
Connection encryption: SSL
Verify SSL certificate: 1
Username: UserName@my.domain.com
Password: ******
Authentication method: USER

Location: Attempt login
[pear_error: message="-ERR Logon failure: unknown user name or bad password." code=-1 mode=return level=notice prefix="" info=""]
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Re: Exchange Online (Office365) email issues?

Post by mushu »

Your screenshot looks like it's from Windows 10 settings, mine is from the Exchange Online admin panel settings for that account.
SL-Gundam
Posts: 667
Joined: 06 Jul 2011, 14:17

Re: Exchange Online (Office365) email issues?

Post by SL-Gundam »

Yes your right.
TLS 1.0 and 1.1 are deprecated, not 1.2

I'm still using the old Exchange admin center. The screenshot was from the initial admin portal

Did you test the account with a normal mail client like Thunderbird in POP3 mode?
mushu
Posts: 204
Joined: 04 Jan 2017, 17:41

Re: Exchange Online (Office365) email issues?

Post by mushu »

So I grabbed a command-line POP3 client that supports ssl/tls and tried it manually from the server, and it grabs the cert and then tried to login and the server returns a bad username/password error message. So apparently the Office365 cloud settings for that account are wonky. I'm trying to see if they are using a different username or password than we have in active directory on premises for that account. I also had them disable mfa/2fa for the account and that did not make any difference either.

Stupid microsoft.
SL-Gundam
Posts: 667
Joined: 06 Jul 2011, 14:17

Re: Exchange Online (Office365) email issues?

Post by SL-Gundam »

Testing the login information should be easy enough using webmail.
You can also check the sync status of a mailbox in the admin portal.

Please let me know the results
Post Reply