I finally get it working !
When i tried the code provided by Rosali, and I found I need to replace the "false" in the "$prot" variable with "notls" according to php_imap documentation. Then the test works.
So, I made the following changes in accounts.php :
Line 116 : $imap_open = "{" . $imap_host . ":" . $imap_port . "/imap/" . $prot . "/novalidate-cert}INBOX";
replaced with :
$imap_open = "{" . $imap_host . ":" . $imap_port . "/imap/" . $prot . "/notls}INBOX";
Line 120 : $imap_open = "{" . $imap_host . ":" . $imap_port . "/novalidate-cert}INBOX";
replaced with :
$imap_open = "{" . $imap_host . ":" . $imap_port . "/notls}INBOX";
Line 320 : $prot = FALSE;
replaced with :
$prot = notls;
Line 652 : $prot = FALSE;
Replaced with :
$prot = notls;
And it works !
So, I presume "false" make php_imap uses tls, but my remote IMAP server is nor SSL nor TLS compliant.
I don't have any skill in PHP, but I think a good thing could be to allow user to choose SSL/TLS/Nothing in accounts menu, or to allow RC admin to set this setting in config.php.inc
I contacted ppl developping this plugin to include my correction/suggestions
Regards,
Damien