cPanel & WHM can send alerts to users for various reasons (for example, when someone changes their account settings or an account approaches a quota). You can select the notifications that an account receives with the following interfaces:
cPanel’s Contact Information interface (cPanel » Home » Preferences » Contact Information).
The Notifications section of WHM’s Tweak Settings interface (WHM » Home » Server Configuration » Tweak Settings).
WHM’s Contact Manager interface (WHM » Home » Server Contacts » Contact Manager).
The notifications use Template Toolkit templates that hosting providers can customize. For example, you can add your logo to a notification, or include a link to your support website. This document explains which notification templates exist and how to customize them.
Available notification templates
cPanel & WHM stores the templates in subdirectories under the /usr/local/cpanel/etc/icontact_templates/ directory. Each subdirectory’s name represents the module that triggers the alert.
Warning:
The system will overwrite any changes that you make to the templates in this directory. For more information about the custom templates directory, read the Customize a template section below.
These templates use the notification_name.type.tmpl naming convention, where notification_name represents the name of the notification that triggers the alert and type represents the type of template.
Notification types
Notification templates use the following types:
subject — Subject line template, which allows you to configure the subject line of the message.
html or text — Message body template, which allows you to configure the body of the message.
html — HTML version.
text — Plaintext version.
If the text template does not exist, the system will derive the text template from the HTML template.
Note:
Additional WP Toolkit notification templates may be available based on 3rd party installations. For more information, read Plesk’s WP Toolkit documentation.
Notification names
The system uses the following notification templates:
Transfer Offloaded Functionality between Child Nodes Success
Accounts/DigestAuthResetNeeded.*.tmpl
An account’s domain name changes and the system notifies the system administrator that it disabled Digest Authentication. This notification template uses the DigestAuthResetNeeded.body.html.tmpl sub-template from the Accounts/includes directory.
AutoSSL fails to request a certificate because all of the website’s domains have failed DCV. This notification template uses the following sub-templates from the AutoSSL/includes directory:
AutoSSL cannot request a certificate because all of the website’s domains have failed DCV (Domain Control Validation).
AutoSSL/CertificateExpiringCoverage.*.tmpl
AutoSSL defers normal certificate renewal because a domain on the current certificate failed DCV. This notification template uses the following sub-templates from the AutoSSL/includes directory:
AutoSSL renews a certificate, but the new certificate lacks at least one domain that the previous certificate secured. This notification template uses the autossl_problems_table.tmpl sub-template from the AutoSSL/includes directory.
AutoSSL renewed a certificate, but the new certificate lacks one or more of the website’s domains. This notification template uses the ‘autossl_problems_table.tmpl’ sub-template from the AutoSSL/includes directory.
AutoSSL has renewed a certificate, but the new certificate lacks one or more of the website’s domains.
AutoSSL/CertificateRenewalCoverage.*.tmpl
AutoSSL will not secure new domains because a domain on the current certificate failed DCV (Domain Control Validation) and the certificate has not entered the renewal period. This notification template uses the autossl_problems_table.tmpl and autossl_queue_table.tmpl sub-templates from the AutoSSL/includes directory.
AutoSSL will not secure new domains because a domain on the current certificate has failed DCV (Domain Control Validation), and the certificate is not yet in the renewal period.
AutoSSL/DynamicDNSNewCertificate.*.tmpl
AutoSSL provisioned a new certificate for a specific dynamic DNS domain.
The system cannot update cPanel & WHM due to immutable files. This notification template uses the ImmutableFiles.action.message.html.tmpl sub-template from the Check/includes directory.
The server’s DNS resolvers respond slowly or do not respond at all. This notification template uses the Resolvers.body.html.tmpl and Resolvers.subject.html.tmpl sub-templates from the Check/includes directory.
The Security Advisor feature detects new issues with high importance. This notification template uses the SecurityAdvisorStateChange.body.html.tmpl and SecurityAdvisorStateChange.subject.html.tmpl sub-templates from the Check/includes directory.
Every two weeks, the system scans all active services and sends a notification that lists all of the unmonitored services. This notification template uses the UnmonitoredEnabledServices.body.html.tmpl and UnmonitoredEnabledServices.subject.html.tmpl sub-template from the Check/includes directory.
The system detects a CloudLinux™ license and provides installation instructions. This notification template uses the Update.body.html.tmpl sub-templates from the CloudLinux/includes directory.
Send the mail client configuration file to a new mail user. This notification template uses the clientconf_manual_settings_include.html.tt sub-template from the Mail/includes directory.
A domain exceeds the hourly emails sent threshold in the Max hourly emails per domain option in WHM’s Tweak Settings interface (WHM » Home » Server Configuration » Tweak Settings).
A domain exceeds the daily emails sent threshold in the Number of emails a domain may send per day before the system sends a notification. option in WHM’s Tweak Settings interface (WHM » Home » Server Configuration » Tweak Settings).
A mail user exceeds the preconfigured threshold of 500 unique outbound messages (excludes mailing lists). The system either takes no action, holds, or rejects additional messages. You can configure the action that the system performs when a domain exceeds this threshold with the Select the action for the system to take on an email account when it detects a potential spammer setting in the Mail section of WHM’s Tweak Settings interface (WHM » Home » Server Configuration » Tweak Settings).
Notices concerning goods and services purchased via the cPanel Market
Market/SSLWebInstall.*.tmpl
The system attempts to download and install an SSL certificate that a cPanel user ordered through cPanel’s SSL/TLS Wizard interface (cPanel » Home » Security » SSL/TLS Wizard).
The system successfully finishes the process to enable filesystem quotas.
Note:
Because the system automatically enables filesystem quotas for all new installations of cPanel & WHM, you will receive this notification during the installation process.
include — This directory contains several useful template snippets and icons in .png file format that you may wish to use in your templates.
wrapper — The main notification template wrapper. This wrapper standardizes the format of each notification and it includes the header, body, and footer in the message. The standard footer contains links that allow the user to disable or change the importance of that type of notification.
If you plan to customize any templates, you must copy these two directories to the /var/cpanel/templates/icontact_templates/ custom templates directory.
Available variables
Notification templates use two kinds of variables: CPANEL and NOTICE.
CPANEL variables
All of the notification templates can use the following CPANEL variables:
locale (object) — If the system directs this notification at a user, this variable returns the user’s locale. Otherwise, the variable returns the server’s locale.
split_time_dhms (function) — This function converts a number of seconds into a four-member array that indicates days, hours, minutes, and seconds. Use this function to transform system times to human-readable times.
NOTICE variables
Each template lists its allowed NOTICE variables and their descriptions in the header comments.
For example, [% NOTICE.ip_address %] displays the IP address of a request.
Customize a template
To customize a template, copy the desired template from the /usr/local/cpanel/etc/icontact_templates/ directory to the /var/cpanel/templates/icontact_templates/ custom templates directory, and make your changes to the copy.
The system uses templates in the custom templates directory before it uses templates from the original directory.
Warning:
You must store both of the following files in the /var/cpanel/templates/icontact_templates/ directory:
The customized wrapper template.
The notification template that the wrapper customizes.
Example
Note:
The following example demonstrates how to add the Example Hosting, Inc. company name to the subject line of account creation notifications.
To customize a template, perform the following steps:
.1Log in to the server via SSH as the root user.
.2If this is your first template customization, run the following command to make the custom templates directory and copy the files in the include and wrapper directories to the custom templates directory:
.3Copy the /usr/local/cpanel/etc/icontact_templates/wwwacct/Notify.subject.tmpl file to the /var/cpanel/templates/icontact_templates/wwwacct/Notify.subject.tmpl file.
.4Open the /var/cpanel/templates/icontact_templates/wwwacct/Notify.subject.tmpl file in a text editor and locate the following entry:
[%-
CPANEL.locale.maketext(‘New account on [_1]([_2])’, NOTICE.host_server,NOTICE.domain);
-%]
.5Edit the entry from step 4 in the Notify.subject.tmpl file to appear similar to the following example:
[%-
CPANEL.locale.maketext(‘Example Hosting, Inc.: New account on [_1]([_2])’, NOTICE.host_server,NOTICE.domain);