Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

Multiple Webmail Domains

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
San
Posts: 8
Joined: Mon Aug 19, 2019 1:03 am

Os: Ubuntu 17x
Web: apache + nginx
Multiple Webmail Domains
  • Quote

Post by San » Sat Aug 31, 2019 3:30 am

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?
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Multiple Webmail Domains
  • Quote

Post by sysdop » Sat Aug 31, 2019 5:58 am

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.
Top

San
Posts: 8
Joined: Mon Aug 19, 2019 1:03 am

Os: Ubuntu 17x
Web: apache + nginx
Re: Multiple Webmail Domains
  • Quote

Post by San » 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.
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Multiple Webmail Domains
  • Quote

Post by sysdop » Mon Sep 02, 2019 9:50 pm

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/
Top

leeroynz
Posts: 2
Joined: Mon Aug 20, 2018 10:44 pm

Os: Ubuntu 15x
Web: apache + nginx
Re: Multiple Webmail Domains
  • Quote

Post by leeroynz » Mon Sep 09, 2019 10:23 pm

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?
Top

sysdop
Posts: 88
Joined: Fri Dec 08, 2017 1:46 am
Contact:
Contact sysdop
Website Skype

Os: CentOS 6x
Web: nginx + php-fpm
Re: Multiple Webmail Domains
  • Quote

Post by sysdop » Wed Sep 11, 2019 10:34 pm

It can be sent from different domains, only a valid rDNS is required.
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password