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!
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?
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
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.
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.
Same here, it seams something has changed between Microsoft and the guide.
Also we use shared mailbox but needed to add every user single as allowed user, who is able to read the shared mailbox, to step „The mailbox user must be assigned to the application. “ in the documentation and not only the shared mailbox user
I have found other behaviour, if i use the application id of the registration in azure instead of the application id of the application it looks like it is working and accepting the login.
However after entering the details i am presented with my login screen of Otobo and after login the created mailbox isn’t added in the otobo configuration
Spawning child process to fetch incoming messages from mail accounts…
outlook.office365.com (IMAPOAuth2)…
Started at Mon Jan 2 08:49:41 2023
Using Mail::IMAPClient version 3.43 on perl 5.034000
Connecting with IO::Socket::IP PeerAddr outlook.office365.com PeerPort 143 Proto tcp Timeout 600 Debug 1
ERROR: Unable to connect to outlook.office365.com: at /usr/share/perl5/Mail/IMAPClient.pm line 377.
Mail::IMAPClient::connect(Mail::IMAPClient=HASH(0x56076580ebb0)) called at /usr/share/perl5/Mail/IMAPClient.pm l ine 315
Mail::IMAPClient::new(„Mail::IMAPClient“, „Server“, „outlook.office365.com“, „Starttls“, ARRAY(0x560766447ae8), „Debug“, 1, „Uid“, …) called at /opt/otobo/Kernel/System/MailAccount/IMAPOAuth2.pm line 75
Kernel::System::MailAccount::IMAPOAuth2::Connect(Kernel::System::MailAccount::IMAPOAuth2=HASH(0x560765a11010), “ ID“, 3, „Host“, „outlook.office365.com“, „Login“, „ticket.helpdesk\@alliance.edu.in“, „Password“, …) called at /opt/ot obo/Kernel/System/MailAccount/IMAPOAuth2.pm line 215
eval {…} called at /opt/otobo/Kernel/System/MailAccount/IMAPOAuth2.pm line 218
Kernel::System::MailAccount::IMAPOAuth2::_Fetch(Kernel::System::MailAccount::IMAPOAuth2=HASH(0x560765a11010), „T rusted“, 1, „Comment“, „Tickets“, „Debug“, 1, „QueueID“, …) called at /opt/otobo/Kernel/System/MailAccount/IMAPOAuth2. pm line 116
Kernel::System::MailAccount::IMAPOAuth2::Fetch(Kernel::System::MailAccount::IMAPOAuth2=HASH(0x560765a11010), „Qu eueID“, 0, „ID“, 3, „UserID“, 1, „Host“, …) called at /opt/otobo/Custom/Kernel/System/MailAccount.pm line 654
Kernel::System::MailAccount::MailAccountFetch(Kernel::System::MailAccount=HASH(0x5607658f9030), „DispatchingBy“, „From“, „CreateTime“, „2022********12********31 04:03:36“, „ChangeTime“, „2022********12********31 04:17:11“, „ValidID“ , …) called at /opt/otobo/Kernel/System/Console/Command/Maint/PostMaster/MailAccountFetch.pm line 180
eval {…} called at /opt/otobo/Kernel/System/Console/Command/Maint/PostMaster/MailAccountFetch.pm line 172
Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch::Run(Kernel::System::Console::Command::Mai nt::PostMaster::MailAccountFetch=HASH(0x560764df38a0)) called at /opt/otobo/Kernel/System/Console/BaseCommand.pm line 48 0
eval {…} called at /opt/otobo/Kernel/System/Console/BaseCommand.pm line 474
Kernel::System::Console::BaseCommand::Execute(Kernel::System::Console::Command::Maint::PostMaster::MailAccountFe tch=HASH(0x560764df38a0), „****************debug“) called at /opt/otobo/Kernel/System/Console/InterfaceConsole.pm line 8 8
Kernel::System::Console::InterfaceConsole::Run(Kernel::System::Console::InterfaceConsole=HASH(0x560764de5c10), “ Maint::PostMaster::MailAccountFetch“, „****************debug“) called at /opt/otobo/bin/otobo.Console.pl line 35
ERROR: OTOBO********otobo.Console.pl********Maint::PostMaster::MailAccountFetch********42 Perl: 5.34.0 OS: linux Time: M on Jan 2 08:58:24 2023
Message: CommunicationLog(ID:3380,AccountType:********,AccountID:********,Direction:Incoming,Transport:Email,ObjectLogT ype:Connection,ObjectLogID:3380)::Kernel::System::MailAccount::IMAPOAuth2 => Something went wrong while trying to connec t to ‚IMAPOAuth2 => ticket.helpdesk@alliance.edu.in/outlook.office365.com‘: Can’t call method „authenticate“ on an undef ined value at /opt/otobo/Kernel/System/MailAccount/IMAPOAuth2.pm line 83.
but, there is no need for all the steps in Azure that are provided in the article. You only need to create one app registration, no need for the enterprise application. Once you create the app registration, just assign the user to the application. I have additionally added the offline_access permission for the user as well.
With this, you can continue with the OTOBO part of the article (OTOBO OAuth2 Configuration)
i still have issue that after successfull login to the microsoft part i am redirected to the otobo login page which i authenticate using my admin account
After logging in into otobo the oauth2 registration isn’t available or saved as a mailbox.
I try to find the logfile(s) but have no clue where the logs are saved, we use the docker version and have no clue what to do next
Our website uses cookies. Cookies are tiny text files which are saved in your web browser or by your web browser on your device when you access websites. They contain a characteristic character sequence allowing to clearly identify your browser upon your next visit to the website.
You can prevent the setting of cookies at any time by making the appropriate setting in your internet browser. Cookies that have already been set can be deleted manually or automatically at any time. This is possible in all common internet browsers. If the setting of cookies is deactivated in the browser, not all functions of the website may be fully usable.
We deliberately use very little cookies.
Detailed information can be found in section 4 of our Privacy Policy.
Necessary cookies
Essential Cookies are necessary to deliver this website and some of its features correctly.
For this reason, we do not provide any opportunity here to disable them.
Notwithstanding this, you can deactivate all Cookies in your Browser Settings at any time. Please be aware, however, that this might have an impact on the functionality of this website.
More information about the cookies to be set and how long they will be stored can be found in section 4 of our Privacy Poliy: Privacy Policy.
Google Analytics' Cookies
When you visit this website, Google Analytics sets cookies on your system. This will help us analyse how you use our website ans tailor it to the needs of our visitors. Your IP address will be automatically anonymised (IP anonymisation and deactivation of your User ID). Therefore, we cannot trace which data a certain user is accessing. The data are not saved together with any other personal user data.
You can deactivate tracking in your browser if you do not want us to be able to track your visit on our website.
Privacy Policy
Detailed information on the usage of cookies as well as our Privacy Policy can be found here: