editing cpanel email notification priority levels from command line

baypan

Registered
Jan 15, 2023
4
1
3
usa
cPanel Access Level
Root Administrator
hello all, this is my first post here :)
so, i was trying to edit the priorities for the email notifications that i receive.
i edited > /var/cpanel/icontact_event_importance.json
and after that which service should i restart to make changes applied?
by the way, my main goal is to disable some notification types. i thought lowering the priority can disable the email notification, but that can be wrong. correct me if i'm wrong. i know this can be done very easily through cpanel itself, but i want to achieve this from command line
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,271
2,228
363
cPanel Access Level
Root Administrator
@baypan - thanks for posting, and welcome!

No services need to be restarted when editing this file, as it is a flat text file that gets read as necessary by cPanel.

Lowering the priority doesn't necessarily disable email notifications. In the main page at WHM >> Contact Manager, you could have "All" set to "Email" and that would mean that any priority level would still trigger an email notification.

Let me know if you need anything else!
 

baypan

Registered
Jan 15, 2023
4
1
3
usa
cPanel Access Level
Root Administrator
@baypan - thanks for posting, and welcome!

No services need to be restarted when editing this file, as it is a flat text file that gets read as necessary by cPanel.

Lowering the priority doesn't necessarily disable email notifications. In the main page at WHM >> Contact Manager, you could have "All" set to "Email" and that would mean that any priority level would still trigger an email notification.

Let me know if you need anything else!
thanks for the great info. And how can i disable for some of the specific events from sending email notifications via command line? i want to learn how to manage this from command line
 

baypan

Registered
Jan 15, 2023
4
1
3
usa
cPanel Access Level
Root Administrator

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,271
2,228
363
cPanel Access Level
Root Administrator
The files are not dependent on the operating system, but /var/cpanel/clevels.conf doesn't exist until you have made a modification in WHM >> Contact Manager. I don't have a way to generate that file from scratch without using the interface at least once. You may not have the iclevels.conf file at all, which is fine.
 

baypan

Registered
Jan 15, 2023
4
1
3
usa
cPanel Access Level
Root Administrator
i've found a solution,
i have edited the icontact_event_importance.json file and made the priority to low (4) and cpanel stopped sending notification for that specific event.
hope this will help who looks for managing the cpanel notifications from command line.
 
  • Like
Reactions: cPRex