Found a Fix
I found a fix for my issue. Here's what I did.
I tried configuring IMAP for my mail server. I can do it using the OSX Mail client, so I know I have an IMAP connection. I kept getting the error from osTicket:
TLS/SSL failure for mail.servername.org: SSL negotiation failed
So I created a test php file with the following code:
<?php
$user = "ticket@servername.org";
$pass = "password";
$connection = imap_open("{mail.servername.org/imap/novalidate-cert}INBOX",$user,$pass) or die(imap_last_error());
echo "Connected";
?>
I was able to reproduce the same error.
After doing some research on ssl and php, I found this:
When imap extension is built with SSL support, the connection defaults to using SSL
I changed the code to add the option /notls as follows:
<?php
$user = "ticket@servername.org";
$pass = "password";
$connection = imap_open("{mail.servername.org/imap/novalidate-cert/notls}INBOX",$user,$pass) or die(imap_last_error());
echo "Connected";
?>
After that, it worked successfully. So, I modified the file class.mailfetch.php and changed line 51 from
$this->serverstr.='/novalidate-cert}INBOX'; //add other flags here as needed.
to
$this->serverstr.='/novalidate-cert/notls}INBOX'; //add other flags here as needed.
After that, I was able to successfully add the email account. Hope this helps anyone else that may have the same issue.
Dominic