Custom URL for Webmail

No. Not really getting that error.
Accessing the snappymail through cybepanel domain/snappymail works but using its dedicated subdomain is the issue

cyberpaneldomaincom/snappymail = working
maildomaincom = the error


Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.)$
RewriteRule ^(.
)$ http://%1/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.) https://%{SERVER_NAME}/$1 [R,L]
RewriteRule ^(.
)$ https://cyberpanel/snappymail/$1 [P]

End CyberPanel Generated Rules.

SHould not work since cyberpanel creates or any other panel create a mailserver from that domain. You need to add something like

If you look at the post you will see he/she ran into this issue:

Doesn’t work with webmaildomaincom that was just example.
Try to do clean install of cyberpanel and do the webmaildomaincom to reproduce the issue.

by the way
Even though the maildomaincom is used by mailserver ports for webserver are not on mailserver so web access to the maildomaincom should work fine without issue. Just a highlight.

Refreshed and cleared cache and tried a new browser all go back to same error

Are you in a position to reinstall your server os and start over? If so share your server os type and version

Good evening, I don’t know if you are still interested, but to do the proxy correctly I solved it this way. I hope it can be the help to someone!

### [PROXY] Snappymail
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/snappymail
REWRITERULE ^(.*)$ https://cyberpanel/snappymail/$1 [P,L,]
RewriteCond %{REQUEST_URI} ^/snappymail
REWRITERULE ^(.*)$ https://cyberpanel/$1 [P,L,] should be replaced with the correct host.


Already installed like 5 times ending up with the same results.

Thanks for your contribution,

Your configuration works super smooth.

Thanks mate.

You all be blessed.

I am very pleased! Always at your disposal. :grinning:

Where i put this code?

This is for each domain?

Hey, Thanks for the input. It works flawlessly. Although after doing this I can’t login through webmail anymore. i am getting error “Server message: Cannot enable STARTTLS.”

Any Idea how to resolve this?

Heya, i am very very new to CyberPanel and still havent figured out most things, i would like to know how exactly i can change the login for the webmain, i have bought my domain through CF and i dont have a problem with the CyberPanel login being ip:port, but since i am offering webmail access to my friends and them having to go to ip:port/snappymail isnt that great for them since their home network has strict rules and they cannot connect to plain IP adresses, i would like to know how i can change the snappymail login thing to webmail.mydomain.tld, i have tried nearly everything that was suggested in the replys above but nothing has worked, thanks in advance for taking your time to help a noobie out

@KingMac , Amazing Tip. Work Just Fine!!!


1 Like

amazing work bro!!! i just came back to this thread and wow . love your solution!

I don’t think is this a problem with the proxy kingmac wrote. this is probably due to your mail ssl . either way to help others perhaps click solution on kingmac’s answer , so that others can find this solution quick!

1 Like