Remove "check email" button

stormy

Well-Known Member
Nov 22, 2003
240
59
178
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,880
2,261
463
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
240
59
178
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,880
2,261
463
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
240
59
178
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

Active Member
Dec 4, 2017
32
5
58
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
240
59
178
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
240
59
178
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.
 

efuzone

Well-Known Member
Mar 17, 2011
84
1
58
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.
Hello,

It is working globally for server all email accounts. Please can you guide me if easily i can do it for only one reseller accounts or one cpanel only..
 

efuzone

Well-Known Member
Mar 17, 2011
84
1
58
cPanel Access Level
Root Administrator
I have tried disabling webmail feature from feature list it has disabled check mail function as well but it is not showing email options after login to webmail like roundcube or something..
 
  • Like
Reactions: cPanelAnthony

Jeanfrnatiesco

Registered
Feb 20, 2022
2
1
3
Brasil
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.
I couldn't get it to work in the Jupiter theme. Any idea how to do it?
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,235
2,423
363
cPanel Access Level
Root Administrator
I didn't provide the earlier solution as it required manually editing cPanel configuration files and continuing to edit them every night so they don't get replaced during updates, so I don't have anything to provide for Jupiter from my end either.
 

Jeanfrnatiesco

Registered
Feb 20, 2022
2
1
3
Brasil
cPanel Access Level
Root Administrator
Got it here.

Create a new folder...
Code:
# mkdir -p /var/cpanel/customizations/content_includes
Create a new file...
Code:
# vim /var/cpanel/customizations/content_includes/cpanel_jupiter_email_accounts_header.html.tt
Put the code in this file and save.
Code:
<style>
a[id^='email_table_menu_webmail'] {display:none;}
a[id^='email_table_expand_webmail'] {display:none;}
#lnkCheckEmail {display:none;}
</style>
- Does not work on V100.
- Working on V102 and V104.
- Not tested on V106
 
  • Like
Reactions: stormy