ckanext-email_notify is a CKAN extension that automatically sends email notifications to the administrators.
It covers three notification types:
- New user registrations – alerts when accounts are created within a configurable time window.
- Users without an organisation – reminds administrators to assign orphaned accounts to a group or organisation.
- Importation updates – reports the outcome of automated dataset imports, including schema validation status and error details.
All notifications are delivered via cron jobs that call lightweight HTTP endpoints protected by an API key.
As usual for CKAN extensions, you can install ckanext-email_notify as follows:
git clone https://github.com/SDM-TIB/ckanext-email_notify.git
pip install -e ./ckanext-email_notify
pip install -r ./ckanext-email_notify/requirements.txtAfter installing the extension, enable it following the instruction below:
- Add
email_notifyto theckan.pluginssetting in your CKAN configuration file (default:/etc/ckan/default/ckan.ini):
ckan.plugins = ... email_notify- Set the required
email_notify.api_keyoption (see Configuration Options). Without it, no cron jobs are registered and all notification endpoints return403.
The extension registers cron jobs automatically on startup via IConfigurer.
All options go in your CKAN .ini file.
| Option | Description |
|---|---|
email_notify.api_key |
Secret key sent as the Authorization header to protect notification endpoints. No cron jobs are created and all endpoints return 403 if this is unset. |
| Option | Default | Description |
|---|---|---|
email_notify.sender_name |
LDM-Sysadmin |
Display name used as the email sender. |
email_notify.sender_email |
noreply.ldm@tib.eu |
Sender email address. |
email_notify.recipients |
(sysadmin emails) | Space- or comma-separated list of recipient addresses. Falls back to the email addresses of all CKAN sysadmin accounts when not set. |
| Option | Default | Description |
|---|---|---|
email_notify.new_users_notify_enabled |
false |
Set to true to enable periodic new-user notifications. |
email_notify.new_users_deltatime |
2 |
Polling interval in minutes (1–59). Accounts created within this window are included in the notification. |
| Option | Default | Description |
|---|---|---|
email_notify.users_without_org_notify_enabled |
false |
Set to true to enable the periodic reminder. |
email_notify.users_without_org_notify_recurrence |
0 16 * * * |
Standard crontab expression controlling when the reminder fires. |
| Option | Default | Description |
|---|---|---|
email_notify.crontab_user |
root |
System user whose crontab the extension writes to. |
ckan.activity_streams_email_notifications |
false |
Standard CKAN option. When true, the extension also registers an hourly cron job to flush CKAN's built-in activity-stream notifications. |
All endpoints require the Authorization header to match email_notify.api_key.
| Endpoint | Description |
|---|---|
GET /send_new_user_email |
Sends the new-user notification email immediately. |
GET /send_noorganization_user_email |
Sends the users-without-organisation reminder immediately. |
GET /test_render_notification_email |
Renders the new-user email template with fixture data and returns the HTML — useful for visual testing. |
GET /test_send_email |
Sends a plain test email and returns SMTP configuration details. |
GET /test_send_email_using_object |
Sends a fixture importation-update email and returns SMTP configuration details. |
If you are interested in what has changed, check out the changelog.
ckanext-email_notify is licensed under AGPL-3.0, see the license file.