I generated SSL certs using this guide. Then I set up dovecot and postfix. View my dovecot conf here and my psotfix main.cf here.

You can use this to configure your own working SSL mail. Remember to install: dovecot, dovecot-imap and postfix.

On your devices, use ports 143/993 (incomping) and 587 (outgoing).

Please note my main.cf file also includes config for mailman.

By karlo