Refer below documents for configuration
Steps for Configuring Workflow Java Mailer to connect using SSL to IMAP Server (Doc ID 1265949.1) --- 4) Configure Dovecot IMAP Server for SSL connection
How to setup an IMAP server on LINUX for E-Business Suite usage (Doc ID 365831.1)
Check the dovecot version
Check if it is 1.0.10
Here are some step by step blogs for configuring IMAP SSL:
You can configure postfix for outbound SMTP:
I usually don't bother with SSL SMTP since no authorization is required.