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
Example:

cyberpaneldomaincom/snappymail = working
maildomaincom = the error

RewriteRules

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 webmail.myprimarydomain.com

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,E=PROXY-HOST:www.example.com]
RewriteCond %{REQUEST_URI} ^/snappymail
REWRITERULE ^(.*)$ https://cyberpanel/$1 [P,L,E=PROXY-HOST:www.example.com]

www.example.com should be replaced with the correct host.

1 Like

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

Hi,
Thanks for your contribution,

Your configuration works super smooth.

Thanks mate.

You all be blessed.

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

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