Page 1 of 1

Multiple Webmail Domains

Posted: Sat Aug 31, 2019 3:30 am
by San
Hi, I have multiple domains and I wanted to set up Webmail on both of them but in the server config you can only have one. How can i have multiple Roundcube domains?

Re: Multiple Webmail Domains

Posted: Sat Aug 31, 2019 5:58 am
by sysdop
Can you give us an example of how you want to have the Roundcube configured?

Usually each domain is accessible from /webmail and can be renamed.

Re: Multiple Webmail Domains

Posted: Sat Aug 31, 2019 6:53 am
by San
So basically have multiple domains (domain1.tld) (domain2.tld) and I want to have Roundcube on (inbox.domain1.tld) and (inbox.domain2.tld) but hosted on the same server on the same VestaCP.

Re: Multiple Webmail Domains

Posted: Mon Sep 02, 2019 9:50 pm
by sysdop
San wrote:
Sat Aug 31, 2019 6:53 am
So basically have multiple domains (domain1.tld) (domain2.tld) and I want to have Roundcube on (inbox.domain1.tld) and (inbox.domain2.tld) but hosted on the same server on the same VestaCP.
You will need to create an alias based on nginx so that in each subdomain the webmail loads.

It is code that you must save in a new nginx template.

Sample Code

Code: Select all

server {
listen %ip%:80;
server_name %domain_idn% %alias_idn%;
root /usr/share/roundcubemail;
index index.php index.html;
access_log /var/log/nginx/%domain%.acc.log combined;
error_log /var/log/nginx/%domain%.err.log error;

location /.well-known/acme-challenge/ { }
location = \(robots.txt|xmlrpc.php|favicon.ico)$ { log_not_found off; access_log off; }
location ~ \.php$ { try_files $uri  =404; fastcgi_pass 127.0.0.1:9000; }

location / { }
location ~ /(libraries|setup) { return 404; }
location ~ /(config|temp|logs) { return 404; }

include %home%/%user%/conf/web/nginx.%domain%.conf*;

}
You must correct the root directory (/usr/share/roundcubemail) to install and start php-fpm and create the .stpl (SSL) apart from the .tpl.

Code: Select all

server {
listen %ip%:443 ssl http2;
server_name %domain_idn% %alias_idn%;
ssl_certificate %ssl_pem%;
ssl_certificate_key %ssl_key%;
root /usr/share/roundcubemail;
index index.php index.html;
access_log /var/log/nginx/%domain%.acc.log combined;
error_log /var/log/nginx/%domain%.err.log error;

location /.well-known/acme-challenge/ { }
location = \(robots.txt|xmlrpc.php|favicon.ico)$ { log_not_found off; access_log off; }
location ~ \.php$ { try_files $uri  =404; fastcgi_pass 127.0.0.1:9000; }

location / { }
location ~ /(libraries|setup) { return 404; }
location ~ /(config|temp|logs) { return 404; }

include %home%/%user%/conf/web/snginx.%domain%.conf*;

}
Temples under Apache must be created in /usr/local/vesta/data/templates/web/nginx/

Re: Multiple Webmail Domains

Posted: Mon Sep 09, 2019 10:23 pm
by leeroynz
Hi Guys, looking into this as well. Couple of questions:

How does one deal with deliverability issues for spam scoring etc when the domain names of all the other sites are different from the rDNS of the mail server?

Can you one mail server send from multiple domains sitting on vesta successfully or can you only have one dedicated mail server for one domain using vesta?

Re: Multiple Webmail Domains

Posted: Wed Sep 11, 2019 10:34 pm
by sysdop
It can be sent from different domains, only a valid rDNS is required.