Hello dear community,
first of all, a big thanks to @usmannasir and his team for their time spent, in order to provide for all of us the awesome CP.
I would like to share some instructions on installing Roundcube on Cyberpanel, because I spent a few weeks trying to complete the istallation and get everything working. I am guessing others will benefit from this also, and maybe the community have some interesting feedback to share. So, let’s begin:
Note: Use at your own risk, in terms of security, functionality and any other potential disadvantage.
Introduction: The instructions will be simple and plain, no screenshots, links or detailed instructions. I trust that most of the readers are experienced users and can somehow figure their way through the worklow.
- Download latest Roundcube from the official roundcube website
- Create a subdomain for your main domain used in this server. For example let’s say you have a VPS server, with primary domain “mycompany”. Create a subdomain named “webmail.mycompany”.
- Install Roundcube in this subdomain. Create a database through Cyberpanel and follow the instructions included in Roundcube ReadMe files or around the web. (Be sure to delete installation folder after the installation)
- In Rouncube config file, be sure to set smtp_host to your main domain, on port 587, and set your ca_files to those of your server
- Create your preferred email accounts for your test domains. E.g. info@mycompany and shop@mycompany from within Cyberpanel
- Login to your server using SSH (e.g. with Putty or WinSCP). Locate postfix/main.cf file. Change the lines “smtpd_tls_cert_file” and “smtpd_tls_key_file”. Insert the locations of the Let’s Encrypt cert and key for your main domain, located in /letsencrypt/live/…
- (Optional) Check /postfix/vmail_ssl.map. Verify each directory in on one line. If not, break the lines and recompile the vmail_ssl.map.db
- When you need emails for a new client website, then create a subdomain “webmail” again under the new website, e.g. “webmail.clientwebsite”. Create the email account through the Cyberpanel, as the other email accounts before.
- Go to OpenLiteSpeed WebAdmin and change the Document Root of the subdomain “webmail.clientwebsite” to point to the root of the first subdomain where the Roundcube is installed “webmail.mycompany”
- Same for any other domains
After that, check your sending and receiving. If everystep was followed properly, it should work. Feel free to provide any feedback.
PS: I know SNI is supported and that this method sends all the forwarding emails from the main domain, but if I am not wrong (by making a small research) this is not a totally wrong method, in fact it is used a lot.
Thank you for your time everyone! I hope I’ve helped someway, and I will be happy to assist with any other info. Happy coding!