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 to another location

Discussion in 'E-mail Discussions' started by apogee, Oct 15, 2009.

  1. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    hello,

    I've installed a new webmail which I want to use in the future.

    So now I want to redirect all my users which try to access webmail over www.xyz.com/webmail to www.mynewwebmaildomain.com. How can I do this?

    in httpd.conf I found this:
    PHP:
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    How can I redirect all request for ^/?webmail/ to another domain?

    Thanks!
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    This may be possible by changing the existing redirect in the Apache configuration (httpd.conf) file, running the Apache configuration distiller, then testing if the change is saved by regenerating/rebuilding the Apache configuration (httpd.conf) file.

    Please see the following documentation for details regarding how to do this step-by-step:
    Apache & cPanel/WHM
    EA3Overview < EasyApache3 < TWiki
    OutsideVHost < EasyApache3 < TWiki
     
  3. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    Thanks Don

    I know that I just can modify /usr/local/cpanel/APACHE_CONFIG but the problem is that I don't know how I must make the redirect.

    Just
    PHP:
    ScriptAliasMatch ^/?webmail/?$ www.mywebmaildom.com 
    or must I execute a Perl or Bash Script which redirects the user with the "header" function?

    Thanks!
     
  4. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    can I solve my problem with this? :

    PHP:
    Redirect ^/?webmail/?$ http://www.mynewwebmailurl.com/ 
    I'm not sure...
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
  6. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    Thanks,

    If I also made this change to /usr/local/cpanel/APACHE_CONFIG it should also work propper after a apache update, right?
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I would not recommend editing the specified file to accomplish the redirect.

    Are other methods not working as expected?
     
  8. aspardeshi

    aspardeshi Member

    Joined:
    Oct 22, 2009
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    redirect works

    you can add a simple autoforwarder in mail settings, but in that case you will also receive emails on your original email and it will also be redirected or forwarded to your target email id automatically. hope this helps. :)
     
Loading...

Share This Page