im not familiar with using caddy as the proxy, but i think thats where you might want to look. I use a flavor of nginx and i have the login page working properly on a completely different url than what i have set up in my mailcow_hostname, nor is it in the additional_server_names. another possibility is that you have a local dns entry of some sort pointing where youre not expecting and since it might be pointing directly at the server its not going to your proxy so the url will change to what it actually is.
example below of my nginx config that you might be able to use to form what caddy needs
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name webmail.address.here;
include /config/nginx/ssl-confs/ssl_fqdnname.conf;
location / {
proxy_pass https://mailcowIPaddress/;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 75;
proxy_send_timeout 3650;
proxy_read_timeout 3650;
proxy_buffers 64 512k;
client_body_buffer_size 512k;
client_max_body_size 0;
}
}
use nslookup on your local computer to see if the the url youre using is going to the ip that youre expecting, either your proxy or directly to the mailcow server