Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default Remove options shown in webmail page after login ?

    When somone logs in to webmail , after login they are shown a page with the Horde icon and some options under it. The options shown on that page are listed as follows;

    [Change Password] [Forwarding Options] [Autoresponder Options] [Aging] [Logout]

    Can someone tell me if there is anyway to remove any or all of these options server wide?

    I would greatly appreciate it.

    Thanks
    Darryl

  2. #2
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default Remove options shown in webmail page after login ?

    I actually figured this out. You modify the following file:

    /usr/local/cpanel/base/webmaillogin.cgi

    by removing the following lines:

    if ($webmail->{envuser} =~ /\@/) {
    print qq{[<a href="$webmail->{urlbase}/webmailpasswd.cgi">Change Password</a>]\n};
    if ($Cpanel::CPDATA{'FEATURE-FORWARDERS'} ne 0) {
    print qq{[<a href="$webmail->{urlbase}/webmailforward.cgi">Forwarding Options</a>]\n};
    }
    print qq{[<a href="$webmail->{urlbase}/webmailautorespond.cgi">Autoresponder Options</a>]\n};
    }


    if (! $Cpanel::CONF{'skipboxtrapper'} && $Cpanel::CPDATA{'FEATURE-BOXTRAPPER'} ne '0') {
    print qq{[<a href="$webmail->{urlbase}/webmailboxtrapper.cgi">BoxTrapper</a>]\n};
    }

    if (-e 'webmailaging.cgi') {
    print qq{[<a href="$webmail->{urlbase}/webmailaging.cgi">Aging</a>]\n};
    }


    This will remove the "Change Password", "Autoresponder", "Boxtrapper", and "Aging" Options but leave the "logout" options.

    Hope this helps someone.

  3. #3
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by tfcservices View Post
    I actually figured this out. You modify the following file:

    /usr/local/cpanel/base/webmaillogin.cgi .
    This file will likely get overwritten whenever /scripts/upcp is run.
    you may wish to create a /scripts/postupcp to copy back your version.
    you may also want to periodically check the cpanel version to see if they made any changes which you'd have to re-incorporate into your version.

  4. #4
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default

    Thank you.

    I will keep that in mind. I have been trying to figure this out for awhile. I just don't want my customers to be able to add forwarders, responders etc... when they check webmail. I do not give my clients access to Cpanel.

    How would I create the script to automatically put back my version? or how do I make it permanent?

    Thanks for responding.

    Darryl

  5. #5
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by tfcservices View Post
    Thank you.

    I will keep that in mind. I have been trying to figure this out for awhile. I just don't want my customers to be able to add forwarders, responders etc... when they check webmail. I do not give my clients access to Cpanel.

    How would I create the script to automatically put back my version? or how do I make it permanent?

    Thanks for responding.

    Darryl
    here's one option:
    http://www.cyberciti.biz/faq/how-to-...can-modify-it/

    the other is to keep your version and a copy of cpanels version in a separate folder. in upcp, look for if the file's Mod time is newer than your original version (or you can do a diff on them, or whatever).. if so, copy the one cpanel stuck there to your cpanel saved version, and copy your modified version back.
    in this case, you can do a diff on the new cpanel version and the saved cpanel version before you copy it, --if they're different, send yourself an email so you can look manually and see if you need to re-incorporate any of the cpanel changes into your version.

    the chattr approach is less work, but I'm guessing theres a high liklihood the file will change as cpanel 11 rolls out, so you'll have to do more work to fix it later.

  6. #6
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default

    Thank you very much, You have been very helpful

  7. #7
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default

    Well, it looks like the new upgrade (CP 11) messed me up. This file no longer contains the same data to edit.

    Does anyone know what file I need to edit now to disable these features?

    Thanks for any help.

    Darryl

  8. #8
    Registered User
    Join Date
    Jul 2006
    Location
    Brazil
    Posts
    2

    Default

    Quote Originally Posted by tfcservices View Post
    Well, it looks like the new upgrade (CP 11) messed me up. This file no longer contains the same data to edit.

    Does anyone know what file I need to edit now to disable these features?

    Thanks for any help.

    Darryl
    You can edit the webmail login page for X3 theme at /usr/local/cpanel/base/webmail/x3/index.html

    I mixed some old webmaillogin.cgi codes with the index.html and it works fine!

    Hope this can help you!

    Att.,

    --
    Rafael Mussi @ Brazil

  9. #9
    Member
    Join Date
    May 2003
    Location
    Alabama
    Posts
    23

    Default

    Thank you.. worked great. I just have to keep editing it each time cpanel is upgraded.... but it works great.

    Thanks,
    DF

  10. #10
    Member
    Join Date
    Feb 2005
    Posts
    312

    Default

    Quote Originally Posted by tfcservices View Post
    Thank you.. worked great. I just have to keep editing it each time cpanel is upgraded.... but it works great.

    Thanks,
    DF
    you have several options.

    one is to use 'chmod +i " on the file (I think it's T.. can't remember off the top of my head)...but that will prevent the file from being over-written.

    The other, and better, option, is to write a little script and call it from /scripts/postupcp
    this script should do one of 2 things.
    Either, copy your modified file over to the right place,
    OR, even better, keep a copy of cpanels version and yours, do a diff on the file against yours, if it differs, do a diff on the file against the cpanel version, if it's the same, then copy your file, if it's different, email you the diffs so you can look and incorporate the new cpanel changes manually.
    Last edited by freedman; 06-13-2007 at 11:55 AM. Reason: edited the chmod option to be the correct one :P

  11. #11
    Registered User
    Join Date
    Jul 2006
    Location
    Brazil
    Posts
    2

    Lightbulb

    Quote Originally Posted by tfcservices View Post
    Thank you.. worked great. I just have to keep editing it each time cpanel is upgraded.... but it works great.

    Thanks,
    DF
    You can set the index.html immutable, then the upgrades won't affect it.
    To do so, run this:
    chattr +i /usr/local/cpanel/base/webmail/x3/index.html

    Once, if you want to unset the immutable flag, just run the following command:
    chattr -i /usr/local/cpanel/base/webmail/x3/index.html

    I did it with webmaillogin.cgi and the upgrades from version 10 didn't affected the file.

    Att.,

    --
    Rafael Mussi @ Brazil

Similar Threads & Tags
Similar threads

  1. Webmail login page and customize webmail server installation
    By patelbhavin8008 in forum E-mail Discussions
    Replies: 2
    Last Post: 05-25-2011, 05:22 AM
  2. Need to remove! options shown in webmail page after login
    By hariskhan in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 11-24-2009, 07:49 PM
  3. Can't change webmail login page
    By misk0 in forum Themes and Branding
    Replies: 1
    Last Post: 03-02-2007, 04:07 PM
  4. webmail login page
    By yukonn in forum New User Questions
    Replies: 1
    Last Post: 01-27-2006, 03:15 AM
  5. Please remove cPanel logo from the Login page it a nuissance and unprofess
    By Major Tom in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 08-19-2005, 01:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube