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.

Link to cPanel webmail login with username prepopulated

Discussion in 'cPanel Developers' started by rlesterphx, Apr 21, 2011.

  1. rlesterphx

    rlesterphx Member

    Joined:
    Jul 22, 2010
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I'm trying to provide a link for clients to easily access their webmail by a link like:
    clientdomain.com/webmail
    which works fine, and I disabled the http authentication so they don't get the ugly popup login prompt.

    But I've tried seemingly every combination of URLs and I can't seem to get the webmail login page to load with the username pre-populated like it does when you click the "Access Webmail" link from within cPanel, which opens a not-so-friendly link like:
    mydomain.com:2082/frontend/x3/mail/webmailform.html?user=account@clientdomain.com&domain=clientdomain.com

    Is there an easy way to do this without creating a custom login form? Thanks!
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,468
    Likes Received:
    196
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That "ugly popup login prompt" is a security feature and not ugly at all. It's the recommended best way to go, IMHO.

    There is no way to login directly to your email that I'm aware of.

    Users these days login more via cell phones or email clients (IMAP or POP3 accounts) than webmail. And when they login to webmail, you would think they'd want to be sure that they are on a secured connection.

    In my experience, explaining to a user that he can get to webmail with a nice short URL like hisdomain.com/webmail/ is all he needs to know. Once that URL is typed in and he's forwarded to the secure connection, who cares what the URL looks like?

    You want your users connecting to your server to be connecting via a secure connection as often as possible. You never know where they are connecting from, or who's listening to (watching) them connecting.
     
  3. rlesterphx

    rlesterphx Member

    Joined:
    Jul 22, 2010
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the follow-up, Infopro.
    I was actually asking about just pre-populating the username (not the password too or auto-logging them in). I guess you're right though about just giving them the short URL for the webmail and letting them do it... I was just trying to make it a smoother experience for users (especially the less technically-inclined who end up calling in to support because they're trying to log in with "username" instead of "username@clientdomain.com").

    We'll have to agree to disagree about the popup login prompt though...I still think those things are ugly!
    As far as security, I was under the impression when I disabled it in WHM (checked the "Disable Http Authentication for cPanel/WebMail/WHM Logins" setting) that it was a security improvement to disable it. It says "This will help prevent certain types of XSRF attacks that rely on cached Http Auth credentials."

    Thanks again!
     
  4. rlesterphx

    rlesterphx Member

    Joined:
    Jul 22, 2010
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Also, like I mentioned cPanel already does what I'm talking about with the "Access Webmail" link, like:
    Code:
    http://mysite.com:2082/cpsess1234/frontend/x3/mail/webmailform.html?user=user@theirsite.com&domain=theirsite.com
    I just want a more friendly link like:
    Code:
    http://theirsite.com/webmail/?user=user@theirsite.com
    (obviously that doesn't work but something similar)
     
  5. AwesomeF1

    AwesomeF1 Registered

    Joined:
    Nov 11, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    South Africa
    cPanel Access Level:
    Reseller Owner
    I have been wanting to save these types of links for a while already.

    Thanks rlesterphx,
    You put me on the right path.

    I got mine working like this:
    Code:
    http://webmail.theirsite.com/login/?user=user@theirsite.com
    I also tested this, it flashed a message to quick to read and then worked.
    Code:
    http://theirsite.com/webmail/login/?user=user@theirsite.com
     
Loading...

Share This Page