Email notifications and messages

Notifications and messages within Canopy can be sent via email. There are user-driven messages and also system-driven messages. A system-driven message might be one relating to an operation having completed (e.g. report ready for download or report due with client today). The content of many of these can be modified via the Message templates system.

Enabling email

In order to set this up, the following settings need to be configured under /etc/canopy/canopy.ini:

EMAIL_TRANSPORT=smtp
EMAIL_HOST=localhost
EMAIL_PORT=25
EMAIL_HOST_USER=canopy@yourdomain.com
EMAIL_HOST_PASSWORD=canopyemailpassword
EMAIL_USE_TLS=required
EXTERNAL_BASE_URL=https://YOUR_CANOPY_URL/

Note

The EXTERNAL_BASE_URL is used as the prefix for any links sent out via email. This is typically set to the production URL of your Canopy server.

Additional settings

It’s recommended to change the author email (EMAIL_AUTHOR_ADDRESS; default: support@checksec.com) and name (EMAIL_AUTHOR_NAME; default: CheckSec Canopy Notifications). These settings should be in the Admin → Settings interface.

Note

When EMAIL_AUTHOR_ADDRESS and EMAIL_AUTHOR_NAME are not set or misconfigured a warning message will be logged whenever an email is sent.

If these are not present, you can add them as follows (from the command line):

  1. Load the shell_plus command:

    sudo canopy-manage shell_plus
    
  2. Create and save the following settings:

email_author_address = Setting(setting="EMAIL_AUTHOR_ADDRESS", value="email@mycompany.null")
email_author_address.save()
email_author_name = Setting(setting="EMAIL_AUTHOR_NAME", value="Pentest Team Notifications")
email_author_name.save()

Configuration Validation

Validation of the email configuration can be done via the send_test_email command. If the email settings have been setup-up properly then an email should be received at the provided address from canopy.

  1. Run the send_test_email command:

    canopy-manage send_test_email me@company.com
    canopy-manage send_test_email me@company.com 'alternate message'
    

Email plugins

It is possible to extend the base functionality of the email system using plugins. The following plugins ship with Canopy: