What do you mean with “extra domains”?
If it is a mail domain, that does not mean something about the CN or the IMAP or https service
e.g. you can have mail.domain.com serving e-mail for “domain.com” (your first mail domain), and at the same time mail.domain.com (this is a hostname!) can serve e-mails for “anotherdomain.com” (extra mail domain, MX record pointing to mail.domain.com).
The 2 parameters you mentioned are only necessary if users should reach the portal also under mail.anotherdomain.com
Then you should not set ENABLE_SSL_SNI=y
if you have less then 100 names.
And then you should not juast “restart acme”, you should do docker compose up -d
as it is written in the docs, otherwise your changed configuration will never be applied.