Redirect www.domain.com/webmail to webmail.domain.com

iLJJ

Registered
Apr 28, 2013
2
0
1
cPanel Access Level
Root Administrator
Hi,

apologies if this has been answered in another thread, but have had a good look and can't find a definite answer on how to exactly do this properly in this configuration

Problem:
We have a setup that consists of emails being run by a dedicated mail server (running cPanel) which we have resolving to webmail.domain.com, this server doesn't host any websites

www.domain.com = server a (webserver)
webmail.domain.com = server b (mailserver)

Current Result:
when visiting url www.domain.com/webmail (server a) the user is redirected to www.domain.com:2095 (server a)

Desired Result:
when visiting url www.domain.com/webmail (server a) the user is redirected to webmail.domain.com (server b)


I found a feature request that relates to this desired configuration: features.cpanel.net/responses/htaccess-overwrite-cpanel-default-redirect-for-webmail-folder


Thanks in advance :)
 
Last edited:

iLJJ

Registered
Apr 28, 2013
2
0
1
cPanel Access Level
Root Administrator
You should check your httpd.conf webmail alias settings and disable it. After that you can configure cname for webmail.domain.com and redirected to server b.
In order to resolve email through your server b then change your remote email server settings to server b.
I don't think you understood me properly

we already have webmail. going to server b, as well as all MX records and all related subdomains for client access for the mailserver

we still want have the /webmail alias working to redirect to the webmail. subdomain, there are a few clients (that think computers are the most confusing things on the planet) keep forgetting about the webmail. thing and have been putting /webmail which of course they remain on server a so are unable to log in since their emails are not on server a