The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect Webmail Page

Discussion in 'General Discussion' started by cmonego, Jul 7, 2017.

  1. cmonego

    cmonego Member

    Joined:
    Jul 10, 2014
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    I would like to know how i can redirect Webmail to mail.domain.tld instead of webmail.domain.tld. I use Easyapache version 4, but i can not perform this redirection, even though the Subdomain Proxy option is enabled.

    How can I do this ?

    []'s
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Hello there,

    Never done it before but you can try copying:

    /var/cpanel/templates/apache2_4/ea4_main.default
    to
    /var/cpanel/templates/apache2_4/ea4_main.local

    and then modify

    /var/cpanel/templates/apache2_4/ea4_main.local

    try doing a find and replace for webmail and replace with mail.

    then restart Apache

    If anything breaks you can remove .local
     
  3. cmonego

    cmonego Member

    Joined:
    Jul 10, 2014
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    I would like to keep webmail.domain.tld and just create one more entry for mail.domain.tld, is it possible? In version 3 of Easyapache, this worked here, but when we upgrade to version 4, when I try to access mail.domain.tld, it does not access webmail.

    []'s
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    In that case, just copy the entries that exist for webmail and use mail instead.

    I don't recall mail.domain.tld ever working too be honest. We still have servers running EA3 and I just tested on a few domains and it doesn't bring to webmail so maybe you had something custom done a while back?
     
  5. cmonego

    cmonego Member

    Joined:
    Jul 10, 2014
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    Exactly, something was done to make it work in EA3. I did not manage this server when it was done, so I do not know what was done. For this reason, I would like to know how to make this work in EA4, so we can keep the same pattern that was running.

    []'s
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I don't recommend manually configuring the mail subdomain for webmail access. Here's a quote from the cPanel 60 Release Notes regarding the mail alias and it's purpose:

    If you try using the "mail" subdomains for another purpose, then it could prevent the AutoSSL feature from properly installing SSL certificates on them.

    Thank you.
     
  7. cmonego

    cmonego Member

    Joined:
    Jul 10, 2014
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello Michael,

    Is there any other way to do this? I already have the ServerAlias mail.domain.tld created in apache conf. As I mentioned earlier, when we had EA3, mail.domain.tld would normally open webmail, but now EA4 does not.

    []'s
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There's no supported method of setting up a custom "mail" subdomain without interfering with the AutoSSL feature. You'd have to remove the entries for "mail.domain.tld" from the domain configuration files in the /var/cpanel/userdata/$username/ directories:

    Mail Subdomain added as alias to main domain in httpd.conf

    Thank you.
     
  9. cmonego

    cmonego Member

    Joined:
    Jul 10, 2014
    Messages:
    18
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Michael,

    What it takes and basically this: how to change domain.com/webmail to mail.domain.com

    The user should use mail.domain.tld instead of webmail.domain.tld, due to the peculiarities that we have internally.
    Is it still possible to perform the procedure reported in post 165526?

    []'s
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,029
    Likes Received:
    1,277
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's possible, yes. However it's unsupported and will break AutoSSL functionality for the "mail" subdomain. You'd have to remove the entries for "mail.domain.tld" from the domain configuration files in the /var/cpanel/userdata/$username/ directories as referenced on this thread:

    Mail Subdomain added as alias to main domain in httpd.conf

    You'd then modify the Apache template files to include the "mail" subdomain as a proxy subdomain.

    Thank you.
     
    cmonego likes this.
Loading...

Share This Page