Non-secure IMAP connection for EMAIL client

Hello, I’ve installed easyengine mail and web by default.

Webmail access works fine.

SMTP Access by default, must be SMTP Server: mail.mydomain.com SMTP Port: 465 SSL/TLS: SSL connected SMTP Server: mail.mydomain.com SMTP Port: 465 SSL/TLS: STARTTLS (SSL/TLS can’t connect)

Receiving Email via IMAP, must be IMAP Server: gpo.mydomain.com IMAP Port: 993 SSL/TLS: SSL connected IMAP Server: mail.mydomain.com IMAP Port: 143 SSL/TLS: non-secure (only)

DNS record for mail.domainname.com and gpo.domainname.com is pointed

IMAP test openssl s_client -crlf -connect mydomaim.com:993 openssl BAD Error in IMAP command received by server.

Email client - Thunderbird and Outlook

How to fix? Thanks in advance.