Multiple TLS Mail-Domain Setup with VestaCP?

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
bschmitt
Posts: 1
Joined: Wed Mar 02, 2016 8:39 pm

Multiple TLS Mail-Domain Setup with VestaCP?

Postby bschmitt » Wed Mar 02, 2016 9:05 pm

I used VestaCP to host multiple domains for different users with E-mail support. When creating a new email account the credentials are shown on the right as follows:

Code: Select all

example1.tld -> IMAP hostname: example1.tld, SMTP hostname: example1.tld, STARTTLS
example2.tld -> IMAP hostname: example2.tld, SMTP hostname: example2.tld, STARTTLS
...


When using these credentials in my mail client I'm getting SSL/TLS errors because the FQDN/ReverseDNS of the server is different to example1.tld or example2.tld so the certs don't match.

When I use the FQDN of the server as SMTP and IMAP host everything is fine, but I don't like that.

Is someone of you able to use the actual TLDs as SMTP/IMAP host for your clients when providing email functionality for multiple domains?

Note: I don't use the DNS functionality in VestaCP. I configured everything at my domain provider as described here (approach 1): http://serverfault.com/questions/385054 ... ith-one-ip

Any help appreciated. Thank you!

Hybrice
Posts: 2
Joined: Thu Mar 17, 2016 12:06 pm

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby Hybrice » Thu Mar 17, 2016 12:19 pm

Did you figure this out? I'm having the same issue!

mikaeljay
Posts: 1
Joined: Fri Mar 18, 2016 3:36 am

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby mikaeljay » Fri Mar 25, 2016 2:44 am

Same issue. Anybody get this to work correctly?

webass
Posts: 83
Joined: Sat Nov 15, 2014 1:16 am

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby webass » Fri Mar 25, 2016 3:31 pm

This bugs me too.

this must come from the setting in the hostname, when it is demanded by exim4 maybe?

5. Make sure server hostname is FQDN compliant
root@localhost:~# hostname
localhost
root@localhost:~# v-change-sys-hostname mail.vestacp.com
root@localhost:~# hostname
mail.vestacp.com

Thats where lots of problems came to my server, when I changed the hostname to a hostname I like (domain.com or abc123 or whatever can be done in hostname normally)

Now, all domains with emailaccounts get listed with the hostname. I dont liek this too, cause the hostname should be not showing my domain

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby baijianpeng » Mon Oct 03, 2016 4:09 pm

I noticed that VestaCP defined SSL certificate in the configuration file for Exim in:

/etc/exim/exim.conf

However, this is a "global" configuration file, not "domain specific". So it is impossible to configure in this file to let Exim use different SSL certificate for respective domains.

This is a wrong method.

I think VestaCP should let Exim to pick up domain specific exim configuration from /home/<user>/conf/mail , in addition to the "global exim conf file". In this way, people can set correct SSL certificate for their mail server.

Hope VestaCP team will improve this.

Thank you.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby baijianpeng » Wed Oct 05, 2016 9:40 am

XoXiLhJ0mn wrote:
Yes, the current exim configuration is of an exim server and not an exim client. If you want exim server to orient to different domains as "domain specific" instead of the server host, you need to configure accordingly.

Mind you, one file could contain many certificates.


hi, @XoXiLhJ0mn,

Thank you for pointing out my mistakes. I am not a server pro. Just a newbie in Linux and VestaCP.

Well, think about such a scene : On the VestaCP server, I have two websites, one is abc.com, one is xyz.com, both has their own SSL certificates installed and enabled. People can visit those two websites via https. And, both websites have their own email accounts on their own domains, such as admin@abc.com and help@xyz.com .

Now, I want to ONLY allow TLS encrypted connection between Microsoft Outlook (an email client software on Windows desktop) and the SMTP server offered by VestaCP on those two websites.

Tell me how to configure Exim to use different SSL certificates for respective domains? Please tell me in detail about what kind of code insering to which file(s), because I only know "copy and paste" (don't worry, I built my own VestaCP in this way).

Thank you.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby baijianpeng » Wed Oct 05, 2016 10:38 am

hi, @XoXiLhJ0mn,

I am surprised that you spare your precious time to answer a newbie user who only knows "copy and paste". Thank you.

Apparently I NEVER depend on YOU to build my server. You had over rated yourself. If you can kindly share some code, I thank you. If you refuse, I will not be surprised, nor depressed.

I feel very lucky that NOT everyone think "it should NOT be so easy to build a server". So there is VestaCP, which is a "so easy" solution for someone like me that only knows "copy and paste". If you like do everything from difficult and complicated commands and source codes, that's your choice. I love VestaCP because it does everything, I only have to pates two lines of code then everything will be installed!

And thanks to everyone that had shared their experience and solutions on forums, I can copy and paste again and again to improve my VestaCP server, I had enabled https with HTTP/2 support now. If other people think in your way, I can not do this myself.

Ok, let's do not drift away from this topic.

For Exim settings, I think it is "not so easy" at present. If the VestaCP team want to make it easier, it should be in this way:

once the Webmaster user has set up the SSL support on VestaCP panel for his domain, then that SSL certificate should be recognized and used by Exim AUTOMATICALLY. So the webmaster does NOT need to configure exim again to specify any certificate file.


So easy, right? I think VestaCP should work this way.

And for you, @XoXiLhJ0mn, you may not love this idea, that is OK, I don't care how you will set your server, I don't care how much time it will cost you to do that.

I think there will be some people have the same opinion like me: jobs should be easier and easier. Otherwise, why we choose VestaCP instead of intall those PHP and Nginx and Exim and MySQL one after one from sourcecode?

krok
Posts: 61
Joined: Wed Oct 01, 2014 10:58 am

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby krok » Wed Oct 05, 2016 5:03 pm

Not possible if only one IP. exim cant handle it.

baijianpeng
Posts: 289
Joined: Tue Dec 22, 2015 2:06 pm

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby baijianpeng » Wed Oct 05, 2016 11:50 pm

Thank you @krok, you provided a key point here.

Then, is there any other email server that support multi-domain on one single IP and support SSL certificates for each domain respectively?

If no email server support this, then this topic can be ended. We just need to use non-encrypted connection via port 25.

krok
Posts: 61
Joined: Wed Oct 01, 2014 10:58 am

Re: Multiple TLS Mail-Domain Setup with VestaCP?

Postby krok » Fri Oct 14, 2016 1:04 am

I was looking for the same answer but ending up giving my clients the details to the mailserver instead. works fine


Return to “Mail Server”



Who is online

Users browsing this forum: No registered users and 5 guests