Access Webmail (Snappy Mail) from subdomain and without port (e.g.

Step 1: Create a Website e.g.

First, you need to decide the domain on which you want to access Web Mail without the port being appended to it. We are going to use

Please make sure that A record of this domain already points towards your server.

Setup Web Mail without port (OpenLiteSpeed)

Open command line and edit:

nano /usr/local/lsws/conf/httpd_config.conf

Paste following content:

extprocessor webmail {
  type                    proxy
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0

Please replace with the domain you choose in Step 1.

Use Rewrite Rules to Proxy to port 8090

You can now use rewrite rules to proxy traffic to port 8090, now edit rewrite rules for the domain you choose in Step 1 using the rewrite rule guide. You can use these rules:

RewriteCond %{REQUEST_URI} !^/snappymail
REWRITERULE ^(.*)$ https://webmail/snappymail/$1 [P,L,]
RewriteCond %{REQUEST_URI} ^/snappymail
REWRITERULE ^(.*)$ https://webmail/$1 [P,L,]

Once done restart OpenLiteSpeed with this command:

systemctl restart lsws

You can now visit Web Mail on your domain

1 Like

works on Litespeed?

Pretty much works with slight adjustments: How to remove port 8090 from CyberPanel