Page 1 of 1

Office 365 Connection refused after Disconnected Imap

Posted: Mon May 23, 2022 11:17 am
by eleanor
hello everyone,\
i'm new to hesk. 3.2.5
I got imap working on office 365.
It also reads the mail neatly, but gives 4 error messages with every connection.

it give the error after its disconnect message?

i try it from the shell.

Code: Select all

php hesk_imap.php
<pre>Connected to the IMAP server &quot;{outlook.office365.com:993/imap/ssl}&quot;.</pre>
<pre>Unread messages found: 1</pre>
<pre>Ticket 2Z8-9RW-B6B9 created/updated.</pre>
<br /><br />

<pre>Disconnected from the IMAP server.</pre>
<pre>Can't connect to AMS-efz.ms-acdc.office.com,993: Connection refused</pre>
<pre>Can't connect to AMS-efz.ms-acdc.office.com,993: Connection refused</pre>
<pre>Can't connect to AMS-efz.ms-acdc.office.com,993: Connection refused</pre>
<pre>Can't connect to AMS-efz.ms-acdc.office.com,993: Connection refused</pre>
what can i do.

Thanks for helping
Wilco

Re: Office 365 Connection refused after Disconnected Imap

Posted: Mon May 23, 2022 11:26 am
by Klemen
Not sure what is happening there, the "connection refused" indeed come after Hesk disconnects from the server. After the imap_close() call, Hesk does not establish any additional connections.

Maybe something on your server is trying to keep connections active, or is pinging active connections? Malware, virus scanner, firewall, ...?

Re: Office 365 Connection refused after Disconnected Imap

Posted: Mon May 23, 2022 12:01 pm
by eleanor
its only if i run the script?

and if i disable debug then:

Code: Select all

 php hesk_imap.php
<h2>An error occured.</h2><p>For details turn <b>Debug mode</b> ON in settings and run this script again.</p>

Re: Office 365 Connection refused after Disconnected Imap

Posted: Mon May 23, 2022 12:18 pm
by Klemen
Ah, OK, this probably means the script was able to connect to the IMAP server only on 5th attempt - the first 4 were unsuccessful and the errors are displayed at the end.

Not sure why first 4 would fail and the 5th would succeed? If it works though, you could ignore these errors.