Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    1

    Default webmail login customization

    hello everyone,

    I would like to customize my webmail login, see i will be creating a login box using ajax with two inputs email and password. So when i click the submit button or login button, which file should should i trigger or target. so that i can enter into my welcoming page of email account. How do i do that.?


  2. #2
    Member
    Join Date
    Jan 2008
    Posts
    141

    Default

    Kindly refer to below mentioned URL which might helps you to solve your issue:

    Customizing Cpanel Login Screen - Web Hosting Talk

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    3

    Default Sample script for webmail login box

    The following script worked good for me - maybe you can use it for yourself if you replace our server info on the first line with yours. Here it is:

    Code:
    <div id="content-wrap"><form action="https://ns5.ourchurch.com:2096/login/" method="post"> <input name="login_theme" type="hidden" value="cpanel" /> 
    <table class="login" style="width: 200px;" border="0" cellspacing="0" cellpadding="0">
    <tbody style="text-align: left;">
    <tr style="text-align: left;">
    <td style="text-align: left;"><strong>Login</strong></td>
    <td style="text-align: left;">&nbsp;</td>
    </tr>
    <tr style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Email:</td>
    <td class="login_lines" style="text-align: left;"><input id="user" name="user" size="16" type="text" tabindex="1" /></td>
    </tr>
    <tr class="row2" style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Password:</td>
    <td class="login_lines" style="text-align: left;"><input id="pass" name="pass" size="16" type="password" tabindex="2" /></td>
    </tr>
    <tr style="text-align: left;">
    <td style="text-align: left;" colspan="2"><input id="login" class="input-button" type="submit" value="Login" tabindex="3" /></td>
    </tr>
    </tbody>
    </table>
    <input name="goto_uri" type="hidden" value="/?login_theme=cpanel" /> </form> <br /> <br />
    <script type="text/javascript"><!--
    /* Must not include external javascript -jnk 06.20.09 */
        var init = function() {
            document.getElementById("user").value = '';
            document.getElementById("pass").value = '';
            document.getElementById("user").focus();
        };
    if( window.addEventListener ) {
        window.addEventListener('load',init,false);
    } else if( document.addEventListener ) {
        document.addEventListener('load',init,false);
    }
    // --></script>
    </div>
    Last edited by cPanelDon; 10-19-2010 at 04:04 PM. Reason: Wrap HTML in CODE BBcode tags

  4. #4
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Default

    Thank you for sharing that script, it worked well for me. I do have a question, why when I log in, it displays the 3 options for SquirrelMail, Horde and Roundcube for about 2 seconds and then jumps into Roundcube?

    Code:
    <form action="http://domain.tld:2095/login/3rdparty/roundcube/?_task=mail" method="post">
    Can someone help me with this post, not sure how to repost it. This code works, but I am having problems with the login. Thank you

    http://forums.cpanel.net/f5/webmail-...on-157378.html

  5. #5
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    Thank you for sharing that script, it worked well for me. I do have a question, why when I log in, it displays the 3 options for SquirrelMail, Horde and Roundcube for about 2 seconds and then jumps into Roundcube?

    Code:
    <form action="http://domain.tld:2095/login/3rdparty/roundcube/?_task=mail" method="post">
    Can someone help me with this post, not sure how to repost it. This code works, but I am having problems with the login. Thank you

    http://forums.cpanel.net/f5/webmail-...on-157378.html
    Is the path to Roundcube being used in your custom login form?

    Unrelated to a custom login form, please see the following documentation that explains one possibility that I believe may be occurring in the described circumstances: Troubleshooting Webmail - Why does a particular webmail application load automatically?

  6. #6
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Default I read the article, but its not that

    thank you, I read the article, but it's not that. Below is the entire code I used for my form if you can help figure out if it is pointing to Roundcube. Thank you

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <div id="content-wrap"><form action="http://domain.com:2095/3rdparty/roundcube/?_task=mail" method="post"> <input name="login_theme" type="hidden" value="cpanel" /> 
    <table class="login" style="width: 200px;" border="0" cellspacing="0" cellpadding="0">
    <tbody style="text-align: left;">
    <tr style="text-align: left;">
    <td style="text-align: left;"><strong>Login</strong></td>
    <td style="text-align: left;">&nbsp;</td>
    </tr>
    <tr style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Email:</td>
    <td class="login_lines" style="text-align: left;"><input id="user" name="user" size="16" type="text" tabindex="1" /></td>
    </tr>
    <tr class="row2" style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Password:</td>
    <td class="login_lines" style="text-align: left;"><input id="pass" name="pass" size="16" type="password" tabindex="2" /></td>
    </tr>
    <tr style="text-align: left;">
    <td style="text-align: left;" colspan="2"><input id="login" class="input-button" type="submit" value="Login" tabindex="3" /></td>
    </tr>
    </tbody>
    </table>
    <input name="goto_uri" type="hidden" value="/?login_theme=cpanel" /> </form> <br /> <br />
    <script type="text/javascript"><!--
    /* Must not include external javascript -jnk 06.20.09 */
    var init = function() {
    document.getElementById("user").value = '';
    document.getElementById("pass").value = '';
    document.getElementById("user").focus();
    };
    if( window.addEventListener ) {
    window.addEventListener('load',init,false);
    } else if( document.addEventListener ) {
    document.addEventListener('load',init,false);
    }
    // --></script>
    </div>
    
    </body>
    </html>
    Last edited by cPanelDon; 10-19-2010 at 04:04 PM. Reason: Wrap HTML in CODE BBcode tags

  7. #7
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    thank you, I read the article, but it's not that. Below is the entire code I used for my form if you can help figure out if it is pointing to Roundcube. Thank you

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    <div id="content-wrap"><form action="http://domain.com:2095/3rdparty/roundcube/?_task=mail" method="post"> <input name="login_theme" type="hidden" value="cpanel" /> 
    <table class="login" style="width: 200px;" border="0" cellspacing="0" cellpadding="0">
    <tbody style="text-align: left;">
    <tr style="text-align: left;">
    <td style="text-align: left;"><strong>Login</strong></td>
    <td style="text-align: left;">&nbsp;</td>
    </tr>
    <tr style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Email:</td>
    <td class="login_lines" style="text-align: left;"><input id="user" name="user" size="16" type="text" tabindex="1" /></td>
    </tr>
    <tr class="row2" style="text-align: left;">
    <td class="login_lines" style="text-align: left;">Password:</td>
    <td class="login_lines" style="text-align: left;"><input id="pass" name="pass" size="16" type="password" tabindex="2" /></td>
    </tr>
    <tr style="text-align: left;">
    <td style="text-align: left;" colspan="2"><input id="login" class="input-button" type="submit" value="Login" tabindex="3" /></td>
    </tr>
    </tbody>
    </table>
    <input name="goto_uri" type="hidden" value="/?login_theme=cpanel" /> </form> <br /> <br />
    <script type="text/javascript"><!--
    /* Must not include external javascript -jnk 06.20.09 */
    var init = function() {
    document.getElementById("user").value = '';
    document.getElementById("pass").value = '';
    document.getElementById("user").focus();
    };
    if( window.addEventListener ) {
    window.addEventListener('load',init,false);
    } else if( document.addEventListener ) {
    document.addEventListener('load',init,false);
    }
    // --></script>
    </div>
    
    </body>
    </html>
    Try changing the form action:
    • From:
      Code:
      <form action="http://domain.com:2095/3rdparty/roundcube/?_task=mail" method="post">
    • To:
      Code:
      <form action="http://domain.com:2095/login/" method="post">

  8. #8
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Default thank, but it doesn't work

    Thank you, I had actually tried that yesterday, and it doens't work. I tried it again, and still nothing. I mean, it logs in, but displays the initial Horde, Squirrell and Roundcube options for about 2 seconds, and then automatically jumps to Roundcube.... its weird... do you have any other suggestions?


    Before, what I established for my clients was a subdomain such as myemail.domain.com and I would point this domain to the link below, and it worked, it goes directly into Roundcube.... I just don't understand why it doesn't, on this custom form. I think the custom form looks much more professional and easier for some people. Hope you can help.. Thank you

    http://domain.com:2095/3rdparty/roundcube/?_task=mail

  9. #9
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    Thank you, I had actually tried that yesterday, and it doens't work. I tried it again, and still nothing. I mean, it logs in, but displays the initial Horde, Squirrell and Roundcube options for about 2 seconds, and then automatically jumps to Roundcube.... its weird... do you have any other suggestions?


    Before, what I established for my clients was a subdomain such as myemail.domain.com and I would point this domain to the link below, and it worked, it goes directly into Roundcube.... I just don't understand why it doesn't, on this custom form. I think the custom form looks much more professional and easier for some people. Hope you can help.. Thank you

    http://domain.com:2095/3rdparty/roundcube/?_task=mail
    Have you tried disabling the auto-load of Roundcube after logging-in? There should be a link or button to both "Stop" and then "Disable AutoLoad" that can be used it alerts you that a webmail program is about to be auto-loaded. This is detailed in the documentation I referenced in an earlier post.
    Last edited by cPanelDon; 10-19-2010 at 05:19 PM. Reason: Clarification

  10. #10
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Red face I did, but it didn't work

    Have you tried disabling the auto-load of Roundcube after logging-in? There should be a "Disable Auto-Load" link or button that you can click when it alerts you that Roundcube is about to be auto-loaded.
    The auto load is not enabled! I did read that article, but it's not enabled for this particular domain. Do you know if there are any settings maybe on WHM that I need to change in terms of roundcube for this to work? or maybe it has something to do with the http: instead of https:

    This is driving me nuts...!!! :-)

    Thank you for your help, I truly appreciate it.

    Regards

  11. #11
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    The auto load is not enabled! I did read that article, but it's not enabled for this particular domain. Do you know if there are any settings maybe on WHM that I need to change in terms of roundcube for this to work? or maybe it has something to do with the http: instead of https:

    This is driving me nuts...!!! :-)

    Thank you for your help, I truly appreciate it.

    Regards
    You are welcome to submit a ticket so that we can take a closer look at the issue. Please consider submitting a support request so that we may assist with inspecting the precise circumstances; I believe direct access is necessary so that an accurate diagnoses can be formed through in-depth investigation. When available, please let me know the ticket ID number of your support request so that we may follow-up internally.

  12. #12
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Default now i get this error

    Now, I got the folowing error, any idea what this means?
    ________________________________________________
    Functions in cPanel / WHM are available only directly through the cPanel and WHM interfaces or through our XML API. It appears that this request is coming from a referring site and might be malicious. Administrator Note: If new ips were recently bound to this server manually you must restart cpsrvd.

    Request Info:
    Requested page: /3rdparty/roundcube/
    Referring site: http://myemail.domain.com/index.html

    Form Data:
    Key Value
    _task mail
    login_theme cpanel
    user test@domain.com
    pass * * * * * *
    goto_uri /?login_theme=cpanel
    If you wish to continue to this page, you may do so but please note that allowing other sites to tell you which actions to perform in cPanel / WHM could be a security risk. Continue at Your Own Risk!
    ________________________________________________

  13. #13
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    Now, I got the folowing error, any idea what this means?
    ________________________________________________
    Functions in cPanel / WHM are available only directly through the cPanel and WHM interfaces or through our XML API. It appears that this request is coming from a referring site and might be malicious. Administrator Note: If new ips were recently bound to this server manually you must restart cpsrvd.

    Request Info:
    Requested page: /3rdparty/roundcube/
    Referring site: http://myemail.domain.com/index.html

    Form Data:
    Key Value
    _task mail
    login_theme cpanel
    user test@domain.com
    pass * * * * * *
    goto_uri /?login_theme=cpanel
    If you wish to continue to this page, you may do so but please note that allowing other sites to tell you which actions to perform in cPanel / WHM could be a security risk. Continue at Your Own Risk!
    ________________________________________________
    What is the output of the following command (via root SSH access)?
    Code:
    # egrep -i "^referrer(blank)?safety=[01]" /var/cpanel/cpanel.config
    The output should indicate if the following options are set as configured using WebHost Manager:
    WHM: Main >> Server Configuration >> Tweak Settings >> Security
    • Blank referrer safety check [?] Only permit cpanel/whm/webmail to execute functions when the browser provides a referrer. This will help prevent XSRF attacks but may break integration with other systems, login applications, and billing software. Cookies are required with this option enabled.
      • On
      • Off default
    • Referrer safety check [?] Only permit cpanel/whm/webmail to execute functions when the browser provided referrer (Domain/IP and Port) exactly matches the destination URL. This will help prevent XSRF attacks but may break integration with other systems, login applications, and billing software. Cookies are required with this option enabled.
      • On
      • Off default

  14. #14
    Member fearmydesign's Avatar
    Join Date
    Aug 2009
    Posts
    93

    Default here are the results

    Here are the results, I guess the first one needs to be on? how do I turn it on, and is having this on going to put my server at risk?

    referrerblanksafety=0

    referrersafety=1



    Thank you for your help

  15. #15
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Quote Originally Posted by fearmydesign View Post
    Here are the results, I guess the first one needs to be on? how do I turn it on, and is having this on going to put my server at risk?

    referrerblanksafety=0
    referrersafety=1

    Thank you for your help
    Disabling a security mechanism has the potential to increase risk; however, it appears that you experienced difficulty while using the Referrer safety check ("referrersafety=1") and so I would consider evaluating whether or not it causes more of an inconvenience for the amount of protection provided; it is entirely optional. I recommend searching for previous posts within the following forums area that is dedicated to security discussions: cPanel and WHM Security - cPanel Forums

Similar Threads & Tags
Similar threads

  1. Login Page Customization
    By jdhf99 in forum Themes and Branding
    Replies: 3
    Last Post: 07-09-2009, 02:28 PM
  2. cPANEL WEBMAIL customization HELP
    By iosoft in forum Themes and Branding
    Replies: 8
    Last Post: 06-03-2008, 09:31 AM
  3. webmail customization
    By weblord in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-17-2007, 08:18 AM
  4. Branded login script customization
    By dxer in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-22-2004, 10:11 AM
  5. selective customization of webmail (imp)
    By cheapweb in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 05-05-2003, 10:19 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube