Knuddi & all
You can only have a single hostname for free and not wildcards, but for mail that is still perfect.
Well if you set the CommonName db setting so that your server common name is say
www.mydomain.comThen purchase/obtain a certificate for
www.mydomain.comThen install the certificate onto your SME server for that domain
Then configure the mail clients to use server hostnames of
www.mydomain.com for SMTP & IMAPS.
So you end up with a certificate domain name that is recognised by mail clients & recognosed by https access, so the one certificate covers all, less need for wildcards then, unless you want to use a whole lot of subdomains, but free or cheap certificates are not so appropriate in that circumstance anyway.
Refer Email FAQ & Email Howto etc or search the Forums on CommonName
Edit:
Here it is:
config setprop modSSL CommonName
www.mydomain.comexpand-template /home/e-smith/ssl.key/key
expand-template /home/e-smith/ssl.crt/crt
signal-event post-upgrade
signal-event reboot