Roundcube Client Help Connect to IMAP / SMTP via 993/587

I have searched this forum and various others to try and find a simple solution but it is way above my knowledge / expertise. Sorry if I missed an answer somewhere.

So here is the question: How do you connect to dovecot or exim via TLS 1.2 or higher?

I have been having trouble connecting with roundcube.

The error code I was getting in my dovecot log was:
imap Info: Disconnected (no auth attempts in 0 secs) roundcube

:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x10, ret=1: before **SSL** initialization

95071:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: before **SSL** initialization

95072:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=-1: before **SSL** initialization

95073:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: before **SSL** initialization

95074:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS read client hello

95075:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write server hello

95076:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write change cipher spec

95077:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: TLSv1.3 write encrypted extensions

95078:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write certificate

95079:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: TLSv1.3 write server certificate verify

95080:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write finished

95081:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: TLSv1.3 early data

95082:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=-1: TLSv1.3 early data

95083:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=-1: TLSv1.3 early data

95084:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=-1: TLSv1.3 early data

95085:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=-1: TLSv1.3 early data

95086:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: TLSv1.3 early data

95087:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS read finished

95088:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x20, ret=1: **SSL**v3/TLS write session ticket

95089:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write session ticket

95090:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2001, ret=1: **SSL**v3/TLS write session ticket

95091:Dec 15 21:42:18 imap-login: Debug: **SSL**: where=0x2002, ret=1: **SSL** negotiation finished successfully

when I made the following setting in my roundcube config file:

 $config['imap_host'] = 'ssl://imap.%d';
 $config['imap_conn_options'] = array (
   'ssl' =>
   array (
      'verify_peer' => false,
      'allow_self_signed' => true,
      'cafile' => '/home/admin/conf/mail/%d/ssl/%d.crt',
   ),
 );

Am I missing something?

This is the default config we use:

So I figured it out. My dumbass was using was using the wrong certificate. The correct certificate is the one eris told to use. This turns on ssl communication with either smtp or imap server.

$config[‘imap_host’] = ‘ssl://localhost’;

“cafile” => “/etc/ssl/certs/ca-certificates.crt”,