[RESOLVED] "Need TicketID" and "Unable to connect to smtp.office365.com"

Moderator: crythias

Post Reply
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

[RESOLVED] "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

Hi guys,
I've been monitoring my syslog, and i cant rid of this errors, which is a big part of my log:

Code: Select all

[Fri May  7 18:02:09 2021][Error][Kernel::System::Ticket::Article::BackendForArticle][109] Need TicketID!

Code: Select all

[Fri May  7 18:02:09 2021][Error][Kernel::System::Ticket::Article::Backend::Invalid::ArticleGet][83] Need TicketID!

Code: Select all

[Sat May  8 13:25:28 2021][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:537032,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:1027098)::Kernel::System::MailAccount::IMAPTLS => IMAPTLS: Can't connect to smtp.office365.com: Unable to connect to smtp.office365.com: 
Any idea what i can do to solve that?
Best regards,
William
Last edited by iwill on 19 May 2021, 11:23, edited 1 time in total.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by root »

iwill wrote: 09 May 2021, 14:31

Code: Select all

[Sat May  8 13:25:28 2021][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:537032,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:1027098)::Kernel::System::MailAccount::IMAPTLS => IMAPTLS: Can't connect to smtp.office365.com: Unable to connect to smtp.office365.com: 
Hi,

At least for the IMAPS I would recommend using the setting the provider is recommending: https://support.microsoft.com/en-us/off ... 6c4ac95353

For the other ones check the error_log from the web server or the daemon log to see if a stack trace provide more details.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

root wrote: 09 May 2021, 16:24
iwill wrote: 09 May 2021, 14:31

Code: Select all

[Sat May  8 13:25:28 2021][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:537032,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:1027098)::Kernel::System::MailAccount::IMAPTLS => IMAPTLS: Can't connect to smtp.office365.com: Unable to connect to smtp.office365.com: 
Hi,

At least for the IMAPS I would recommend using the setting the provider is recommending: https://support.microsoft.com/en-us/off ... 6c4ac95353

For the other ones check the error_log from the web server or the daemon log to see if a stack trace provide more details.

- Roy
Hi Roy,
In fact, i fetch an emails in a office365 account, but i use to send emails with a onPrem Exchange account.
Image
This is the only settings where i put office365 parameters. One strange things is, when i use one IP from pool of DNS office365.com, i dont get any error.

About NeedTicketID, when i check error_log im seeing this, but i cant go forward on troubleshoot:

Code: Select all

ERROR: OTRS-CGI-47 Perl: 5.16.3 OS: linux Time: Sun May 2 17:38:12 2021

 Message: Need TicketID!

 RequestURI: /otrs/index.pl?

 Traceback (28766): 
   Module: Kernel::System::Ticket::Article::BackendForArticle Line: 109
   Module: Kernel::System::TemplateGenerator::_Replace Line: 1718
   Module: Kernel::System::TemplateGenerator::Template Line: 468
   Module: Kernel::Modules::AgentTicketActionCommon::Run Line: 1573
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 1135
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 38
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by zzz »

Hello William,

Your host is wrong. It should be outlook.office365.com.

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

zzz wrote: 09 May 2021, 21:48 Hello William,

Your host is wrong. It should be outlook.office365.com.

Best regards
Emin
Now im getting this:

Code: Select all

[Mon May 10 07:55:23 2021][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:537700,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:1027940)::Kernel::System::MailAccount::IMAPTLS => IMAPTLS: Can't connect to outlook.office365.com: error while reading data from server: Connection reset by peer
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by root »

Hi,

Please check the communication log for details.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

root wrote: 10 May 2021, 10:54 Hi,

Please check the communication log for details.

- Roy
Here this is:
Image
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by zzz »

That's the system log and not the communication log.
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

zzz wrote: 10 May 2021, 10:58 That's the system log and not the communication log.
You are right, my mistake.
Image
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by zzz »

Ok, still the same message.

Any necessary package missing or not installed in the correct version?
Check with: /opt/otrs/bin/otrs.CheckModules.pl --all

Does your Exchange Online allow connections via IMAP or via IMAP and basic auth?
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by root »

@zzz I guess you point towards new tenants in O365 only w/ OAuth?
zzz wrote: 10 May 2021, 11:09
Does your Exchange Online allow connections via IMAP or via IMAP and basic auth?
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

zzz wrote: 10 May 2021, 11:09 Ok, still the same message.

Any necessary package missing or not installed in the correct version?
Check with: /opt/otrs/bin/otrs.CheckModules.pl --all

Does your Exchange Online allow connections via IMAP or via IMAP and basic auth?
Does your Exchange Online allow connections via IMAP or via IMAP and basic auth Yes, in fact, the email are successfuly fetched besides these errors
Image
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by zzz »

root wrote: 10 May 2021, 11:12 @zzz I guess you point towards new tenants in O365 only w/ OAuth?
Yes, but it looks like it's something else.

Well if you're still successfully fetching messages, I am out of ideas.
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

zzz wrote: 10 May 2021, 12:13
root wrote: 10 May 2021, 11:12 @zzz I guess you point towards new tenants in O365 only w/ OAuth?
Yes, but it looks like it's something else.

Well if you're still successfully fetching messages, I am out of ideas.
And comes again the same error guys:

Code: Select all

[Mon May 10 10:40:19 2021][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:537994,AccountType:-,AccountID:-,Direction:Incoming,Transport:Email,ObjectLogType:Connection,ObjectLogID:1028550)::Kernel::System::MailAccount::IMAPTLS => IMAPTLS: Can't connect to outlook.office365.com: Unable to connect to outlook.office365.com: 
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by root »

Hi,

You might try a few times to fetch the e-mails manually with --debug and see if there are more details.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

root wrote: 10 May 2021, 13:44 Hi,

You might try a few times to fetch the e-mails manually with --debug and see if there are more details.

- Roy
Seems the best way indeed. Can you enlight me how can i do it?
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by root »

Code: Select all

bin/otrs.Console.p Maint::PostMaster::MailAccountFetch --debug
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

root wrote: 10 May 2021, 14:06

Code: Select all

bin/otrs.Console.p Maint::PostMaster::MailAccountFetch --debug
After i fecthed some mails manually, i cant see any error for now in communication log.

EDIT: Aparently, after i changed to IMAPS from IMAPTLS, no error comes out.
cbg
Znuny expert
Posts: 169
Joined: 25 Jun 2016, 23:29
Znuny Version: 5.0.9

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by cbg »

Please do the following:

Login in to O365 -> Security and generate an App password

This password will be your e-mail password in the email accounts.
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Re: "Need TicketID" and "Unable to connect to smtp.office365.com"

Post by iwill »

cbg wrote: 19 May 2021, 10:46 Please do the following:

Login in to O365 -> Security and generate an App password

This password will be your e-mail password in the email accounts.
Thank you my friend. Actually, the solution for my case is on previous post.
Post Reply