Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

webmail subdomain on all new account

Discussion in 'E-mail Discussion' started by herbertjoei, Nov 28, 2006.

  1. herbertjoei

    herbertjoei Member

    Joined:
    Aug 9, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    Is there a way to have cpanel create a webmail.domain.com subdomain on all new accounts and automatically configure it to redirect to www.domain.com/webmail?

    I know I can create a webmail subdomain and create a redirect to it manually on every site I create but I want it to be automatic.

    So far, what I have done is to edit the DNS template to contain webmail as A record so that there would be a webmail subdomain.

    I think I should be adding a /webmail to the public_html with some redirect rule on the skeleton but i'm not really sure how to do this.

    Can somebody help? Thanks.

    Herbert
     
  2. lostinspace

    lostinspace Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    122
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Colorado Springs, CO
    You'll want to create a 'webmail' dirictory within the skeleton directory and add an .htaccess file to the directory with the following:
    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^webmail.domain.com$
    RewriteRule ^(.*)$ http://domain.com/webmail [R=301,L]
    I guess I just realized the problem with this while I typed the reply (how can you specify the resellers domain automatically??).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. herbertjoei

    herbertjoei Member

    Joined:
    Aug 9, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    151
    That is exactly my problem. Unlike the DNS template, there's a variable that can be substituted for the actual domain.

    Thanks for replying!
     
  4. lostinspace

    lostinspace Well-Known Member

    Joined:
    Jul 19, 2003
    Messages:
    122
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Colorado Springs, CO
    Well, not the ideal fix but you can supply your reseller domain as the domain. This will work for any non dedicated IPs.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice