Hi,
Apache SSL is a completely different thing that IMAPS. Squirrelmail is a web client for your imap server.
If you want to use https you should configure apache accordingly. Does
https://xx.xx.xx.xx works? If it does, then also
https://mail.domain.com should work, maybe with some configuration changes.
If you want to use IMAPS, then you must configure your imap server for this. Does you imap server works securely? You can use Thunderbird to test it.
At last if both servers work independently, then you have to run conf.pl to configure Squirrelmail to use IMAPS and define as imap port 993