Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Problem with Email Fetching (Imap)

Hi everyone,
we start using osticket as a ticket system for our IT Departement and we really love it. It's helping us a lot in organizing our task in our departement.

A few month ago, i configure a mailbox so people can send an email to it instead of using the interface to create ticket. it was working really well, and let us manage priority and collaborator that need to receive information on a ticket when the ticket has been closed or been added a message.

one day i got a problems with my Exchange Server and it lost connection to our network. the problem have been fixed and the server has been reboot. The Mail server was working as usual after that and no change have been made to his configuration since it was a network switch that was the source of the problem.

But, after the lost of connectivity of the email server, OSTicket Stop being able to connect to the mailbox to fetch the email.
i have reboot my osticket server, and my exchange server. i have double check every connection information, but they are corrected and haven't been change since the last time it was working.

here my configuration so you can have a good view of my setup.
OSTicket Server : Ubuntu 16.04.3 LTS
OSTicket Version 1.10
Web SErver : Nginx 1.10.3
Mysql : 5.7.21
PHP : 7.0.22

Email Fetching Trough IMAP
port 993
Protocol : IMAP + SSL

Email Server : Microsoft Windows Server 2012 R2 With Microsoft Exchange 2013

Error Log :
Invalid login. Check IMAP settings   (Known to be good)
[CLOSED] IMAP connection broken (server response)

i didn't find any related log on /var/log of my linux server.

BTW, SMTP Work without problems for sending email.

if anyone have an idea, i would be very grateful, since i must currently create manually ticket that have been sent to the mailbox.
if you want log that i didn't give, just ask and i will find and upload them.


  • Any PHP errors? I had fetching problems once related to PHP, when I switched to 5.6 everything magically started working again. Some users have reported problems with PHP 7.0

    I would check your PHP logs and possibly try using 5.6

    My PHP error was:
     PHP Fatal error: Only variables can be passed by reference in C:\inetpub\wwwroot[sitename]\include\class.plugin.php on line 555
  • Are you running SELinux?
    Have you tried re-entering the username in the settings?
    Are you running a firewall on your Exchange Server?
  • re-entering the username in the setting didn't change anything. SELinux status is Disabled and no firewall on the exchange server.

     the PHP and nginx Log on the server doesn't show any error when it failed to save the imap setting.

    if it's the only option available, ill check later to switch to php5.6, but as i said, it was working with php7 until the server lost connection with the exchange server.

  • exchange server logs: Are you seeing the connection attempt and why it fails?
  • sorry for the delay, i was out of the office yesterday. i have some connection attempt log on the IMAP exchange log

    #Software: Microsoft Exchange Server
    #Log-type: IMAP4 Log
    #Date: 2018-02-14T14:21:34.097Z
    #Fields: dateTime,sessionId,seqNumber,sIp,cIp,user,duration,rqsize,rpsize,command,parameters,context
    2018-02-14T14:21:34.441Z,0000000000000001,2,,,,22,39,71,authenticate,GSSAPI,"R=""00000001 NO The AUTH protocol exchange was canceled by the client."";Msg=AuthCancelled"
    2018-02-14T14:21:37.566Z,0000000000000001,3,,,osticket,3111,38,37,authenticate,PLAIN,"R=""00000002 NO AUTHENTICATE failed."";Msg=Proxy:************:1993:SSL;ErrMsg=ProxyFailed;LiveIdAR=OK;Excpt=""Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée ************:1993-System.Net.Sockets.SocketException"";ExStk=H4sIAAAAAAAEAHVPMU4DMRDskfjDlrnG8gUSJemiU5BSgCLuBY6zAYs7r7VeS76Ob9DRhm/cT3gJDgpCFFQ72pmdmW2HKNirBxTVkn1BiZe5yRaDOPIw0Xmhtb7VelatYJ1s8giWvMd8pv3n65uBkGD8EEYYT2L2nSsKw9AVjvjgvBFMDNbtO/xeGsAcGGMcTz16AcZjKhihXk5VPV+omZrOV/VyeXN9BQDjO7T/FVUbf2jObaxMtus4ePuIMXUC5hdXPy73zjJFOparbJ+Nf0K1o7DtTVANMaoiD+Qj3hkrxIPaMeXh4l6ebagPHQr+DXKGqy/yQ3zISAEAAA=="
    2018-02-14T14:21:39.644Z,0000000000000001,4,,,osticket,2075,38,37,authenticate,PLAIN,"R=""00000003 NO AUTHENTICATE failed."";Msg=Proxy:************:1993:SSL;ErrMsg=ProxyFailed;LiveIdAR=OK;Excpt=""Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée ************:1993-System.Net.Sockets.SocketException"";ExStk=H4sIAAAAAAAEAHVPMU4DMRDskfjDlrnG8gUSJemiU5BSgCLuBY6zAYs7r7VeS76Ob9DRhm/cT3gJDgpCFFQ72pmdmW2HKNirBxTVkn1BiZe5yRaDOPIw0Xmhtb7VelatYJ1s8giWvMd8pv3n65uBkGD8EEYYT2L2nSsKw9AVjvjgvBFMDNbtO/xeGsAcGGMcTz16AcZjKhihXk5VPV+omZrOV/VyeXN9BQDjO7T/FVUbf2jObaxMtus4ePuIMXUC5hdXPy73zjJFOparbJ+Nf0K1o7DtTVANMaoiD+Qj3hkrxIPaMeXh4l6ebagPHQr+DXKGqy/yQ3zISAEAAA=="
    2018-02-14T14:21:41.722Z,0000000000000001,5,,,osticket,2078,38,69,authenticate,PLAIN,"R=""00000004 NO AUTHENTICATE failed.\r\n* BYE Connection is closed. 14"";Msg=Proxy:************:1993:SSL;ErrMsg=ProxyFailed;LiveIdAR=OK;Excpt=""Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée"";ExStk=H4sIAAAAAAAEAHVPMU4DMRDskfjDlrnG8gUSJemiU5BSgCLuBY6zAYs7r7VeS76Ob9DRhm/cT3gJDgpCFFQ72pmdmW2HKNirBxTVkn1BiZe5yRaDOPIw0Xmhtb7VelatYJ1s8giWvMd8pv3n65uBkGD8EEYYT2L2nSsKw9AVjvjgvBFMDNbtO/xeGsAcGGMcTz16AcZjKhihXk5VPV+omZrOV/VyeXN9BQDjO7T/FVUbf2jObaxMtus4ePuIMXUC5hdXPy73zjJFOparbJ+Nf0K1o7DtTVANMaoiD+Qj3hkrxIPaMeXh4l6ebagPHQr+DXKGqy/yQ3zISAEAAA=="

    sorry for the small part in french, it's mean connection refused because target computer refused it

    what bother me is that it's say: ,authenticate,PLAIN. even if the setting is set to IMAP+SSL on port 993
    i have try to connect with IMAP only on port 143 and the same log appear on the logfile with only the port number that is different.

  • "No connection could be established because the target computer explicitly refused"

    Looks to me like your server is refusing the connection.

    Since you haven't shown us your settings I can't hazard much of a guess as to why that would be, but does prompt me to ask if you are prefixing the server with ssl:// or tls://.


  • prefixing the server with ssl:// or tls:// give that error
    Can't open mailbox {tls://mail.server.tld:993/imap/ssl/novalidate-cert}INBOX: invalid remote specification

    don't hesitate to ask if you want to known a setting i didn't post.

    i didn't thought that we could enter something other than an hostname in the setting.
    there's not much info other than how to schedule polling on the pop/imap setting guide

    sadly the is not much info from the exchange server other than the log i provide.

  • I honestly have no idea.  Firewall?  Exchange user have permissions to connect?

  • thanks for you help ntozier,
    i finally got some time to work on the problems and foud the solution.
    you were completly right, the problem wasn't from osticket at all but from my exchange serveur imap proxy.

    running this command on the exchange powershell Get-ServerComponentState -Identity SERVERNAME
    show me that the IMAP PROXY Component was inactive. as soon as i start it up, i have been able to reconfigure osticket.
    Thanks for your help, and sorry for the long delay. it has been a very long and rough start of a year.
  • Very welcome.  :)  I'm glad that you got things sorted.
Sign In or Register to comment.