Viewing 6 reply threads
  • Author
    Posts
    • #14013

      Hi,

      Today at around 16:00PM we started having issues with our OTOBO. It suddenly it stopped fetching emails.

      Debugging the issue using this command
      su -c „./otobo.Console.pl Maint::PostMaster::MailAccountFetch –debug“ -s /bin/bash otobo

      the following error appears:

      Message: CommunicationLog(ID:32330,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:32678)::Kernel::System::MailAccount::IMAP => IMAPS: Auth for user support@example.com/outlook.office365.com failed!

      Checking communication log from the OTOBO, we can see that the last successful fetch try was at 15:30

      Additionally OTOBO version 10.0.15 (without docker) is the one we have. SMTP has been tested as well and it works without any issues (it is able to send mails). We are using Exchange Online.

      Full debug log:
      Spawning child process to fetch incoming messages from mail accounts…

      outlook.office365.com (IMAPS)…
      [… cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connecting to outlook.office365.com:993
      [… cpan-lib/Net/IMAP/Simple.pm line 133 in sub _connect] connected, returning socket
      [… System/MailAccount/IMAPS.pm line 52 in sub new] waiting for socket ready
      [… System/MailAccount/IMAPS.pm line 52 in sub new] looking for greeting
      [… System/MailAccount/IMAPS.pm line 52 in sub new] got a greeting: * OK The Microsoft Exchange IMAP4 service is ready. [WgBSADAAUAAyADcAOABDAEEAMAAxADgANgAuAEMASABFAFAAMgA3ADgALgBQAFIATwBEAC4ATwBVAFQATABPAE8ASwAuAEMATwBNAA==]\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 0 LOGIN support@example.com „89^nM&4K@x$df@W3″\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 265 in sub _process_cmd] 0 NO LOGIN failed.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 0 NO LOGIN failed.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1191 in sub _seterrstr] LOGIN failed.\r
      [… cpan-lib/Net/IMAP/Simple.pm line 879 in sub _send_cmd] 1 EXPUNGE\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1251 in sub _send_cmd] 2 LOGOUT\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 1 BAD Command received in Invalid state.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 1 BAD Command received in Invalid state.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1197 in sub _seterrstr] warning unknown return string (id=2): 1 BAD Command received in Invalid state.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] * BYE Microsoft Exchange Server IMAP4 server signing off.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] * BYE Microsoft Exchange Server IMAP4 server signing off.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 881 in sub _process_cmd] 2 OK LOGOUT completed.\r\n
      [… cpan-lib/Net/IMAP/Simple.pm line 1276 in sub _cmd_ok] 2 OK LOGOUT completed.\r\n
      ERROR: OTOBO-otobo.Console.pl-Maint::PostMaster::MailAccountFetch-23 Perl: 5.30.0 OS: linux Time: Thu Oct 13 15:40:10 2022

      Message: CommunicationLog(ID:32333,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:32681)::Kernel::System::MailAccount::IMAP => IMAPS: Auth for user support@example.com/outlook.office365.com failed!

      Traceback (655390):
      Module: Kernel::System::CommunicationLog::_LogError Line: 546
      Module: Kernel::System::CommunicationLog::ObjectLog Line: 314
      Module: Kernel::System::MailAccount::IMAP::_Fetch Line: 222
      Module: Kernel::System::MailAccount::IMAP::Fetch Line: 109
      Module: Kernel::System::MailAccount::MailAccountFetch Line: 574
      Module: (eval) Line: 180
      Module: Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run Line: 172
      Module: (eval) Line: 468
      Module: Kernel::System::Console::BaseCommand::Execute Line: 462
      Module: Kernel::System::Console::InterfaceConsole::Run Line: 88
      Module: ./otobo.Console.pl Line: 35

      Done.
      ————————————————

      Any kind of help would be appreciated!

    • #14015
      Stefan Rother
      Keymaster

      Hi Amar,

      Microsoft disable the Basic Authentication step by step for IMAP4 or POP3:

      A tutorial to change the authentication mode is here:

      https://doc.otobo.org/manual/admin/10.1/en/content/communication-notifications/postmaster-mail-accounts.html#pop3-and-imap-oauth2-authentification

      I hope that helps!

      Stefan

      Team OTOBO

    • #14030

      Hi Stefan,

      Thanks for the guide! I was able to follow it and set up all the needed apps, unfortunately when I change the authentication to IMAPOauth2 and I try to login to the MS page with the mailbox, this error appears:

      What kind of permissions should I grant to my support account in AAD?

      Thanks again for the help!

    • #14031

      Just as an additional information, I have added my support user to the AAD enterprise application and app registrations. as well as assigned it the Cloud Application Administrator role

    • #14032

      I have managed to fix this problem I think? But I have encounterend a different one. Whenever I try to login with the support email, this error appears:

      Sorry, but we’re having trouble signing you in.

      AADSTS500113: No reply address is registered for the application.

      I double checked by redirect url configure in the AAD app and it is correct. If I copy paste the URL I entered it takes me to Mail Account Management page.

    • #14265
      Ronald Müller
      Participant

      Hi Amar,

      did you solve the problem with the redirect URI? We have the same problem while switching to POP3OAuth2. We followed the OTOBO manual for the configuration and stuck here.

       

      Kind regards

      Ronald

    • #14294
      Pedro Miguel
      Participant

      Hello all,

      I got a similar error when change IMAPS to oauth2. I am redirected to an O365 login page, and after that get this message:

      AADSTS900971: No reply address provided.

      I have confirmed thar Redirect URI is https://serverFQDN/otobo/index.pl?Action=AdminMailAccount and all configurations are according to Otobo manual.

      Any idea about it?

      Regards.

       

       

       

       

       

       

Viewing 6 reply threads
  • You must be logged in to reply to this topic.