Office 365 authentication error

Moderator: crythias

Post Reply
demoncrest
OTRS newbie
Posts: 2
Joined: 16 Apr 2019, 17:14
OTRS Version?: otrs-6.0.17

Office 365 authentication error

Post by demoncrest » 16 Apr 2019, 19:18

Good day dear please I require your support.

I have the following problem

ERROR: OTRS-otrs.Console.pl-Maint :: Email :: MailQueue-67 Perl: 5.16.3 OS: linux Time: Tue Apr 16 09:45:20 2019

Message: CommunicationLog (ID: 157440, AccountType: -, AccountID: -, Direction: Outgoing, Transport: Email, ObjectLogType: Connection, ObjectLogID: 300720) :: Kernel :: System :: Email :: SMTP => SMTP authentication failed ( SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH').

The Office credentials are correct as the user.

Thanks for the support

alexus
OTRS superhero
Posts: 284
Joined: 20 Sep 2010, 16:54
OTRS Version?: ITSM 6.0.22
Real Name: Alexey Yusov
Company: Radiant System Group s.r.o
Location: Prague
Contact:

Re: Office 365 authentication error

Post by alexus » 17 Apr 2019, 00:10

Try to use SMTPS or SMTPTLS
Alexey Yusov

Production: OTRS ITSM 6.0.22 on CentOS 7 x64 Linux with MySQL
Tested: OTRS ITSM 5.0.14
Radiant System OTRS Intergrator
RS4OTRS marketplace
Stay tuned on our Facebook
Get OTRS Professional Services - Consulting, Implementation, Training, Development, Support!

demoncrest
OTRS newbie
Posts: 2
Joined: 16 Apr 2019, 17:14
OTRS Version?: otrs-6.0.17

Re: Office 365 authentication error

Post by demoncrest » 17 Apr 2019, 16:22

Good day friend in cases is SMTPS or SMTPTLS the error persists that can happen?

crythias
Moderator
Posts: 10102
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Office 365 authentication error

Post by crythias » 19 Apr 2019, 22:35

Maybe set up a connector in Office365 that allows your OTRS WAN IP address without authentication.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

ezoltan
OTRS newbie
Posts: 4
Joined: 01 Jun 2019, 21:31
OTRS Version?: 6.0.18
Real Name: Zoltan Erszenyi
Company: Electro Orizont

Re: Office 365 authentication error

Post by ezoltan » 03 Jun 2019, 17:22

@demoncrest,

As many others have found, OTRS Community has trouble authenticating to O365.

I tried all available options (SMTP, SMTPS, SMTPTLS) along with Option 1 and Option 3 as per https://docs.microsoft.com/en-us/exchan ... g-office-3. With or without the custom connector, no go (sorry crythias, unfortunately that didn't work).

Here is what worked for me:
- Found that postfix was already present on my brand-spenking-new Centos7 Minimal Install with OTRS installed and configured, so I thought I'll use it as relay/smarthost to O365.
- Configured postfix to authenticate to O365 and to use TLS, as described in many forums, such as https://linuxhowtoguide.blogspot.com/20 ... relay.html
- Configured OTRS to send notifications to localhost using SMTP (no encryption)

The idea is that OTRS sends the notification to an SMTP MTA which happens to be postfix installed on the same machine, which, in turn, relays it to O365 via an authenticated session.

Happy to confirm that it worked a treat.

The drawback is that I need an Exchange Online mailbox and thus I am burning a license. However I use that same mailbox to fetch ticket request emails, so it doesn't concern me that much.

In order to save the license, I believe the following setup would also work (didn't test it though)

1. Install a local postoffice (e.g. dovecot) and create a mailbox. Configure OTRS to fetch emails from this mailbox.
2. Install/configure a local MTA (e.g. postfix) that can handle incoming SMTP traffic.
3. Configure mail routing between O365 and the local MTA as per https://docs.microsoft.com/en-us/exchan ... route-mail.
4. (Optional) Lock down inbound SMTP traffic from O365 only, so that your OTRS inbox doesn't get abused (reduce the attack surface on inbound TCP 25). For the URLs and IP addresses used for this purpose see https://docs.microsoft.com/en-us/office ... nge-online.
5. Add your public IP address, from which OTRS emails originate, to your domain's SPF record.

Your should be ready to rock and roll.

Hope this helps.
=====================
See you at https://ezoltan.blogspot.com

Post Reply