Page 1 of 1

Split WEB / MAIL Setup

Posted: Thu Jun 14, 2018 10:18 am
by Felix
If we want our VESTA hosted domains/sites to be blazing fast we'd go for an SSD VPS/Dedicated. But that would mean way less storage for web sites and emails :(

I'm trying to figure out a way for a split WEB / MAIL setup. One SSD VPS with VESTA being a Web/DB Server and another HDD VPS with VESTA being the Mail Server. Although this seems quite easy to implement with DNS CNAME records, there are a few issues...
  • Double Entry
  • Webmail
Double Entry
I need to create double accounts, Double Web Domains and Double Mail Domains, one on each server. The second Web Domain is needed on the Mail Server if I want the server to reply to webmail.domain.tld. Apparently the second Mail Domain is needed on the Mail Server, to accept mail for the domain

Webmail
The default setup for VESTA webmail is domain.tld/webmail. This means that extra configuration is needed on the Mail Server to setup webmail.domain.tld to serve roundcube.

Does anyone know/can think of a more simple Split WEB / MAIL Setup ? Would that qualify for a feature request for VESTA ?

Re: Split WEB / MAIL Setup

Posted: Mon Jun 18, 2018 4:33 am
by pipoy
Set your DNS properly

Web Server
A record

Mail Server
SKIM and SPF Records

Does your application send out emails?
If yes, you also need to set DKIM and SPF on the DNS for the web server

Sample:
11.11.111.11 - web server IP
22.22.222.22 - mail server IP

@ A 11.11.111.11
@ MX 0 hostname.mailserver.com
10 hostname.webserver.com

0 is for routing. This is important if you are application installed in webserver is sending application emails.
10 is for validating to avoid spam

@ TXT "v=spf1 a mx ip4:11.11.111.11 ip4:22.22.222.22 ~all"

Combined SPF and you need to edit your SPF record in both vesta servers



For DKIM, copy the DKIM either on the webserver to the mail server and domain registrar. Or mail server to your webserver or domain registrar. Just have 1 DKIM record on both servers and also copy on the domain registrar

Will look something like this

mail._domainkey TXT "v=DKIM1; k=rsa; p=blahblahblahadlkajsdlkasjdklasjdlkasjdlkasjdlkasjdklasjdklasjdklasjdaklsdj"

Re: Split WEB / MAIL Setup

Posted: Mon Jun 18, 2018 5:25 am
by mehargags
Almost all seasoned admins would run a setup like this only... Webservers would be separate from Mail servers. Infact in high availability / load balancing scenarios you would also run separate DB servers.

As Pipoy explained already, all you need is a properly planned DNS setup. This is a pretty standard setup so you should be able to work around it easily.

Re: Split WEB / MAIL Setup

Posted: Sat Jun 30, 2018 5:50 pm
by Felix
Thank you for your replies, but I already know how to set this up (in fact I already have this ready). I'm sorry for the misunderstanding... :(

My question was twofold:
1. Is there a way to automatically create mail domains & mailboxes on the mail server, from VESTA installed on the web server? Like DNS Cluster where we don't need to setup the same zones on the cluster DNS server, because they're created automatically by the 1st VESTA DNS Server
2. Roundcube on the mail server needs to be reconfigured to "listen" on webmail.domain.tld instead of the default domain.tld/webmail. It would be cool if there was an easy way for this to be done like DNS Cluster functionality.

To sum this up... This post is NOT about how to do it. It's about how to simplify it. If there isn't a way to simplify it, would VESTA coders consider adding a functionality for the email service similar to DNS Cluster?

Re: Split WEB / MAIL Setup

Posted: Thu Jul 05, 2018 6:50 am
by mehargags
It is an advanced configuration and so needs a bit of work connecting VestaCP and slave DNS.No there is no simple way of doing it what you asked for.