stefanpejcic / OpenPanel

A highly customizable web hosting control panel built with Docker 🐳
https://openpanel.com
216 stars 33 forks source link

Webmail Domain #252

Closed Eyecu closed 3 weeks ago

Eyecu commented 3 weeks ago

OpenPanel version(s) affected

0.3.3

What OS are you using?

Debian

Description

Cannot Update Webmail Domain

How to reproduce

On OpenAdmin Go to Email - Email Settings. Under Webmail Domain ( right now defaults to http://ip.address:8080 type in new domain ie https://webmail.domain.com or https://webmail.domain.com/ (tried both) and click save domain. After a few moments it gives a popup saying failed to update webmail domain

Possible Solution

No response

Additional Context

No response

stefanpejcic commented 3 weeks ago

Hello,

the webmail domain should be just the doamin name webmail.domain.com

Eyecu commented 3 weeks ago

Hmm you are right i did webmail.domain.com and it updated successfully but then the field reverts back to http://ip.address:8080/

And clicking on any webmail link: OpenAdmin - Email Accounts: OpenPanel - Webmail both go to http://ip.address:8080 OpenPanel - Email Accounts clicking on webmail gives an error failed to fetch.

stefanpejcic commented 3 weeks ago

can you stop&start the OpenPanel from OpenAdmin > Services page and try again?

if it is still the same, please:

Eyecu commented 3 weeks ago

output of opencli email-webmail is correct returning webmail.csnode.com

restarting open panel and open admin did not change anything

and the host proxy file is # roundcube location /webmail { return 301 https://webmail.csnode.com; }

After restarting openadmin the panel still reports the webmail URL as http://ip.address:8080

stefanpejcic commented 3 weeks ago

oh, I just remembered something.. that domain was owned by user when we added it for webmail, so in the config it must still have the proxy to IP:8080 that we added manually..

Can you remove it from user account and then add it only as a webmail domain again?

Or temporary add another subdomain to confirm this, like: webmail2.csnode.com

Eyecu commented 3 weeks ago

I was kind of wondering about that, I removed the webmail domain name from the user account. tried setting says it's successful then reverts to HTTP://server.ip:8080 tried setting webmail2.csnode.com and did the same thing. says successful then after a second or two the field reverts back to the server.ip:8080

stefanpejcic commented 3 weeks ago

Output of the command was: webmail2.csnode.com; the ; at the end indicated that / was missing before it, sorry I missed that in the output here. Ive added / before the ; and now /webmail from sidebar in user panel is working.

Webmail button on Emails page displays CORS error in the browser console, I've changed the code to now automatically add the webmail domain to CORS list in the user panel, so this is now working as well.

Eyecu commented 3 weeks ago

It's usually something small and stupid. Thank You.