I have the following configuration :
domain1.com
->1.1.1.1
domain2.com
->1.1.1.1
domain3.com
->1.1.1.1
They all point to the same machine and the same VHost / machine.
This machine has a courier-imap[-ssl]
configured.
Each domain has email addresses.
The problem is I have a ssl certificate for www.domain1.com
.
But when I configure an email address in my mail client for exemple contact@domain2.com wireshark tells me that the mail client is connecting to :
autodiscover.domain2.com
no big-deal cos not found in the dns recorddomain2.com
using port 443 and has a certificate host address missmatch because my certificate is configured for domain1.com so my mail client raise an error and so are the customers.
My question is what is the correct way to handle this situation? To not get an ssl domain missmatch error. I want my customer to use imap.domain1.com as the incoming mail server. and smtp.domain1.com as the outgoing one. Without having the warning...
I tried to disable port 443 listening for domain2, domain3 etc ... but i can't find a way to do it apache is always handling it. Maybe there is a better solution?