Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAG2 LOGOUT on Microsoft Exchange #213

Closed
freescout-helpdesk opened this issue Mar 9, 2022 · 4 comments
Closed

TAG2 LOGOUT on Microsoft Exchange #213

freescout-helpdesk opened this issue Mar 9, 2022 · 4 comments

Comments

@freescout-helpdesk
Copy link
Contributor

When connecting via oAuth to Microsoft Exchange Server from time to time we get the following:

>> TAG1 AUTHENTICATE XOAUTH2 dXNlcj...
>> TAG2 LOGOUT
<< OK AUTHENTICATE completed.

<< BYE Microsoft Exchange Server IMAP4 server signing off.

<< OK LOGOUT completed.

When it happens it waits around 30 seconds on TAG1 AUTHENTICATE XOAUTH2 command.
And after some time it's possible to connect again with the same Access Token...

It's strange that TAG2 LOGOUT is called before OK AUTHENTICATE completed

@Webklex
Copy link
Owner

Webklex commented Mar 9, 2022

Hi @freescout-helpdesk ,
this looks like a timeout to me. The logout gets always called on __destruct. Given that the OK Auth came afterwards indicates that the call has been aborted before auth could return it's success.

Best regards,

@freescout-helpdesk
Copy link
Contributor Author

Is it possible to set IMAP connection timeout?

@freescout-helpdesk
Copy link
Contributor Author

Nevermind. Not a big problem.

@Webklex
Copy link
Owner

Webklex commented Mar 9, 2022

Hi @freescout-helpdesk ,
just in case you are still wondering if it is possible; yes it is. At least if you aren't using the legacy mode.

/** @var \Webklex\PHPIMAP\Client $client */
$client->setTimeout(60);
$client->connect();

This would set the timeout to 60 seconds.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants