Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 16 to 23 of 23
  1. #16
    Member sleddog's Avatar
    Join Date
    Jun 2004
    Location
    Labrador, Canada
    Posts
    44

    Default

    Try removing all the HTML.

  2. #17
    Member
    Join Date
    Jan 2004
    Posts
    755

    Default

    You could setup a subdomain of webmail.domain.com that points to the appropriate url. Lots easier than doing all that php file stuff

  3. #18
    Registered User
    Join Date
    Oct 2004
    Posts
    12

    Default

    I'm use your scripts but steel show the pop up login.

    Quote Originally Posted by dalem
    squirrelmail must be set up differently on differnt builds of OS

    PHP Code:
    http://domain.com:2095/squirrelmail/src/login.php worked for me. 
    mine goes to neomail it needs the 3rdparty in it


    I am sure you could write a php or cgi script to redirect to the different mail clients but that wasnot the orig question

    here is a simple java script


    <script type="text/javascript"> function set_target() {

    var username, password, servername, login_option, protacal;
    domain = document.forms.login_form.user.value;


    login_option = document.forms.login_form.login_option.value;

    login_option == '2096' ? protacal = 'https://' : protacal = 'http://'
    ;

    document.forms.login_form.action = protacal + domain + ':' + login_option
    ;

    } </script>

    domain name
    <form name="login_form" method="post" onsubmit="set_target();">
    <table width="154" height="59" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td height="38">
    <p><font color="#ffffff" size="1">DOMAIN
    NAME </font>
    <input style="width: 125px; height: 18px;" name="user" class="input" type="text" value="">
    <br> <select style="width: 125px; height: 18px;" name="login_option" class="input">

    <option value="2096/3rdparty/squirrelmail/src/login.php">squirrelmail</option>
    <option value="2096/neomail/neomail.pl">neomail/</option>
    <option value="2096/horde/index.php">horde Webmail</option></select> <font size="1" color="#ffffff">LOGIN
    TYPE </font> </p></td></tr><tr><td height="21">
    <input type="image" src="/images/login.gif" width="47" height="16"> </form>

  4. #19
    Registered User
    Join Date
    Mar 2007
    Posts
    1

    Default Simple login form for Squirrelmail (works for the others as well)

    If you want a login form straight to the squirrelmailbox then try this example derived from cpanels own login script http://www.cpanel.net/cpanel-login.phps (save as a .php-file):

    Code:
    <html>
    <h1>[Web Hosting Company Name Here]</h1>
    
    <b>Webmail Login</b><br>
    
    <?php
    if ($_GET['failed'] == "1") {
    ?>
    <font color=#FF0000>Your login attempt failed!</font>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/3rdparty/squirrelmail/src/login.php\" method=POST>";
    ?>
    User: <input type=text name=user><br>
    Pass: <input type=password name=pass><br>
    <?php
    print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
    ?>
    <input type=submit value=Login>
    </form><br>
    </html>
    I hope you find it useful! There are some security considerations though. The form lets you login to the webmail with the back-button even if you fill in the wrong user/pass. The second is that your user/pass is submitted unencrypted. If you have som better ideas, please submit them to this thread!
    Last edited by Kiper; 08-10-2007 at 04:31 AM. Reason: Added some afterthought

  5. #20
    Registered User
    Join Date
    Dec 2007
    Posts
    1

    Default

    Quote Originally Posted by Kiper View Post
    If you want a login form straight to the squirrelmailbox then try this example derived from cpanels own login script http://www.cpanel.net/cpanel-login.phps (save as a .php-file):

    Code:
    <html>
    <h1>[Web Hosting Company Name Here]</h1>
    
    <b>Webmail Login</b><br>
    
    <?php
    if ($_GET['failed'] == "1") {
    ?>
    <font color=#FF0000>Your login attempt failed!</font>
    <?php
    }
    print "<form action=\"https://" . $_SERVER['HTTP_HOST'] . ":2096/3rdparty/squirrelmail/src/login.php\" method=POST>";
    ?>
    User: <input type=text name=user><br>
    Pass: <input type=password name=pass><br>
    <?php
    print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
    ?>
    <input type=submit value=Login>
    </form><br>
    </html>
    I hope you find it useful! There are some security considerations though. The form lets you login to the webmail with the back-button even if you fill in the wrong user/pass. The second is that your user/pass is submitted unencrypted. If you have som better ideas, please submit them to this thread!
    I want to login direct in squirrelmail too. can you help me? i tried your code, but return pass wrong. Help me please.
    Last edited by klecehost; 12-05-2007 at 02:08 PM.

  6. #21
    Member
    Join Date
    Sep 2003
    Posts
    158

    Default

    Please vote for http://bugzilla.cpanel.net/show_bug.cgi?id=6202 if you would also like to see an option to directly login to webmail rather than having to choose the webmail program each time.

  7. #22
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    506

    Default

    Quote Originally Posted by chrisj View Post
    Inspired by your comments, I realised I could simply place the following php redirect message in a page called index.php in a folder called mail. Thereby my client can simply type in www.theirdomain.com/mail enter their username and password and end up straight away in their inbox. Excellent - thanks guys
    Chris

    index.php simply contains:

    <?php
    header("Location: http://domaincom:2095/neomail/");
    exit;
    ?>
    So will you be adding the mail folder to each client? You can define it globally in httpd.conf as:

    Alias /mail/ /path/to/neomail/
    This will make any http://anydomain.com/mail to be redirected to http://anydomain.com/neomail

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  8. #23
    Member
    Join Date
    Sep 2003
    Posts
    234

    Default

    I put an Alias for /horde in httpd.conf

    But I get an internal server error when I go to it.

    Alias /horde/ /usr/local/cpanel/base/horde/

    Ditto for Roundcube and squirrelamil.

    What do I need to do?

Similar Threads & Tags
Similar threads

  1. Is There URL Straight To Awstats Like There Is For Webmail
    By mrmbarnes in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-02-2008, 06:49 PM
  2. carnt send receve email or login to webmail
    By Harry E in forum E-mail Discussions
    Replies: 2
    Last Post: 01-17-2008, 02:55 PM
  3. Email send from webmail gives a time stamp 12 hours off.
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-08-2007, 04:01 PM
  4. webmail login - just won't let any sub-email accounts in.
    By JustinK in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 09-26-2002, 02:39 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube