Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    20

    Default webmail subdomain on all new account

    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. #2
    Member lostinspace's Avatar
    Join Date
    Jul 2003
    Location
    Colorado Springs, CO
    Posts
    124

    Default

    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??).
    Josh Kennedy
    Lost in Space Hosting, Inc.

    "Hosting for the Next Millennium"
    Company Site
    Community Forum

  3. #3
    Member
    Join Date
    Aug 2005
    Posts
    20

    Default

    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. #4
    Member lostinspace's Avatar
    Join Date
    Jul 2003
    Location
    Colorado Springs, CO
    Posts
    124

    Default

    Well, not the ideal fix but you can supply your reseller domain as the domain. This will work for any non dedicated IPs.
    Josh Kennedy
    Lost in Space Hosting, Inc.

    "Hosting for the Next Millennium"
    Company Site
    Community Forum

Similar Threads & Tags
Similar threads

  1. webmail subdomain not work
    By upsforum in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-30-2011, 05:09 AM
  2. How to stop changing IP adress webmail subdomain after every upgrade?
    By orange7 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-14-2010, 10:11 AM
  3. webmail subdomain doesn't work
    By C4talyst in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-10-2010, 03:47 AM
  4. Webmail Subdomain Not Working
    By C4talyst in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-24-2010, 01:59 PM
  5. Webmail Subdomain
    By jfeap in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-20-2006, 02:38 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube