Remove "check email" button

stormy

Well-Known Member
Nov 22, 2003
143
12
168
Spain
cPanel Access Level
Root Administrator
This has been discussed here:
Changes to webmail login behaviour from cpanel "Email Accounts" section.

The thread is locked now (too old) and the feature request was dismissed:
Remove 'Access Webmail' from Email Accounts

However, for many of us this is still relevant, probably more so with the just released new email accounts interface, with its prominent "Check email" button.

I understand the reasons for cPanel not wanting to remove this button (kind of).

Maybe there's a way to target this button with custom CSS and hide it?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello @stormy,

I understand the reasons for cPanel not wanting to remove this button (kind of).

Maybe there's a way to target this button with custom CSS and hide it?
We document how to customize the cPanel interface with UI includes on the document below:

Guide to cPanel Interface Customization - UI Includes - Developer Documentation - cPanel Documentation

The "Check Email" entries that you will need to reference when customizing the interface are located in the following files:

/usr/local/cpanel/base/frontend/paper_lantern/email_accounts/views/list.ptt
/usr/local/cpanel/base/frontend/paper_lantern/email_accounts/views/manageDefault.ptt
/usr/local/cpanel/base/frontend/paper_lantern/email_accounts/views/manage.ptt


Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
143
12
168
Spain
cPanel Access Level
Root Administrator
Thank you, I will get into it and post my solution in case anyone else is interested.

I still think that there should be a checkbox somewhere that removes these. There's a big difference between giving users a false sense of security and giving them a button that says "click here to spy your coworkers email". :D
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hi @stormy,

I recommend adding your feedback about this topic to the following feature request:

Multiple cPanel Logins (cPanel Subusers)

While it's not a direct request for the feature you're asking for, it does relate to changing the underlying structure of which features are accessible to an individual cPanel user.

Thank you.
 

stormy

Well-Known Member
Nov 22, 2003
143
12
168
Spain
cPanel Access Level
Root Administrator
Thanks Michael. I haven't found a way to target it with CSS - I was planning on adding a "display: none" to it.

I will add my feedback to that request (which I voted for years ago!) but in this case I wouldn't want that feature accessible to any cPanel user.
 

Peprowigh

Registered
Jun 24, 2019
1
0
0
Pune, India
cPanel Access Level
Website Owner
Thank you, I will get into it and post my solution in case anyone else is interested.

I still think that there should be a checkbox somewhere that removes these. There's a big difference between giving users a false sense of security and giving them a button that says "click here to spy your coworkers email". :D
I agree with stormy about not allowing the cpanel user to access the other users emails. It also is an intrusion of privacy.
I believe there is no need to allow accessing any emails directly without authentication.

Since I being a website owner, the technical team member who has access to cpanel has ability to check others emails and this is a concern.

Can something be done about it.
 

gramzon

Member
Dec 4, 2017
23
3
3
Croatia
cPanel Access Level
Root Administrator
An administrator will always have access to private data. If you do not trust someone they shouldn't have cPanel access in the first place.
Also, if they have shell access they can see all the emails anyway.
 
  • Like
Reactions: cPanelMichael

stormy

Well-Known Member
Nov 22, 2003
143
12
168
Spain
cPanel Access Level
Root Administrator
Well, I was searching for more info about this and found my own topic. :)

I've been able to come up with some CSS that hides the button, for those of us that don't want it on display for cosmetic reasons.

For the List email accounts page, I'm using a wildcard CSS selector:
Code:
a[id^='email_table_menu_webmail'] {display:none;}
And for the Manage an email account page:
Code:
#lnkCheckEmail {display:none;}
Now I just need to find the easiest way to add this to the CSS styles. Reading up on:

Probably this should be done via an include. Any thoughts/suggestions?

Please note, I am fully aware that the administrator can still find many, many ways to read emails. I just want to remove those buttons which in my opinion encourage to do so.
 

stormy

Well-Known Member
Nov 22, 2003
143
12
168
Spain
cPanel Access Level
Root Administrator
Update - I did it! It's very easy.

1. Navigate to /var/cpanel/customizations/includes
2. Create file email_accounts_page_header.html.tt
3. These are the contents of the file:

Code:
<style>
a[id^='email_table_menu_webmail'] {display:none;}
#lnkCheckEmail {display:none;}
</style>
I hope this is correct and useful for someone else.