Customise Email Templates for Branding
You can replace default cPGuard branding in user-facing notifications with your own company identity.
Template Directory
/opt/cpguard/app/resources/email_templates/
Safe Workflow
- Copy the default template and append
_custom. - Edit only the custom copy.
- Keep Twig variables and logic blocks intact.
- Test using
cpgcli notification --test.
Example:
cp /opt/cpguard/app/resources/email_templates/user_infected_files.html \
/opt/cpguard/app/resources/email_templates/user_infected_files_custom.html
nano /opt/cpguard/app/resources/email_templates/user_infected_files_custom.html
Common Branding Changes
- Logo URL and footer company name
- Brand colors and support contact links
- Copy tone and call-to-action text
Important
- Do not edit original template files directly.
_customfiles are not overwritten during software updates.- Email clients support limited CSS; prefer table-based layout and inline styles.
Test Emails
Use test notifications while iterating templates:
cpgcli notification --test scanner_detection_user --template test_template.html --to [email protected] --count 1
cpgcli notification --test cms_threats_user --template test_template.html --to [email protected]
cpgcli notification --test user_disabled --template test_template.html --to [email protected]
cpgcli notification --test account_suspension_user --template test_template.html --to [email protected] --type domain
For full variable-level template details, see the legacy deep-dive page under Troubleshooting.