0

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 record
  • domain2.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?

yokoloko
  • 101
  • 4

2 Answers2

1

That is what the autodiscover mechanism is for.

I assume use Outlook. You have to set up the subdomain and provide an autodiscover.xml. Here are some tips for that.

For other clients there can be other ways. Thunderbird for example uses autoconfig instead.

Christopher Perrin
  • 4,741
  • 17
  • 32
0

I found a solution it's not the most elegant one but it works.

I put all the traffic off domain1.com on another ip and listen on apache Vhost only for this IP. So when the mail client try to access https://domain2.com he has no result so no certificate missmatch and can then configure his imap and smtp manually

yokoloko
  • 101
  • 4