Starting with version 2.7.0 Resilio Connect Management Console can send an e-mail to admin when job run is complete and when files in Sync job are synced. This is done in two steps - setting mail server and configuring mail notifications for jobs.
Set up mail server
To start with, admin shall setup mail server in MC General settings.
If enabled, MC will initiate connection to SMTP with TLS handshake. If disabled, MC won't use it by default, but if SMTP replies that it supports TLS, MC will switch to it.
Use anonymous SMTP server
Enable this option if your SMTP server accepts non-authenticated login. Otherwise authentication error will be reported.
Verify server certificate
Many SMTP servers make use of (self-signed) certificates. If such a cert cannot be verified for a reason, connection to SMTP server will not be possible. Uncheck this parameter to skip cert verification.
SMTP server configuration peculiarities
While configuring SMTP server please keep in mind following peculiarities:
- While it is usual to use port 25 for non-TLS encrypted connection and 465 for TLS-encrypted, it is not mandatory and up to your server configuration. The port number does not specify protection.
- SMTP server host name MUST match hostname of your server certificate
- the "Use TLS" checkbox only controls if TLS channel is established from the very beginning of the session. Your SMTP server may demand establishing TLS later to accept credentials regardless of unchecked "Use TLS" checkbox.
- Anonymous authentication not supported, you must supply username and password.
- If your SMTP server is using self-signed certificate, ensure Management Console is aware of this certificate. To do it, place it in PEM format anywhere on Management Server and set global environment variable "NODE_EXTRA_CA_CERTS=<path_to_file>"
Resilio Connect does not in any way perform verification of the mail server or the e-mail addresses that will be used in job notifications. If a configured e-mail address is not valid or bounces mails, MC is not going to report it.
Connection without TLS over port 25Some email servers allow connecting over port 25 without TLS, though in some cases email server can tell Connect server that it supports TLS. Connect server will try to verify certificate from email server and it might not work if the certificate is self-signed. Adding email server's self-signed certificate as a environment variable (NODE_EXTRA_CA_CERTS=file) containing a path to the PEM file might help. Check the following article: Adding self-signed certificates in NodeJS
Configure e-mail notifications per job
Each job can send a notification to inform admin about job run completion. They mainly reflect the job run summary from Management Console. To set up and e-mail notification go to Jobs -> Configure job. Select and existing job or create new.
For sync jobs
Emails are sent when new or updated files are synced, basically when job's status changes from 'syncing' to 'synced'.
For transfer jobs
Distribution and Consolidation - Emails can be sent in the following cases:
Job run is successfully completed:
meaning that all online Agents completed the transfer and executed scripts. There are no Agents with 'failed' status.
Job run finished with errors:
meaning that job completed but some of the Agents are with status 'failed' and/or have some error.
Job run aborted:
meaning it was aborted by a user or by scheduler.
Job run timed out:
meaning that job run didn't complete within the timeout period as set in Profile.
Admin can trigger a notification for each job run completion - either successful or failed. It's possible to choose a trigger to send mail only if job run finished with errors. This trigger is not available for Sync jobs.
There's also a checkbox to not send email if no data was transferred during the run. This is especially useful for jobs that are scheduled to run periodically but they don't necessarily have new data to transfer.
It's possible to send a notification to a Management Console user, or simply any e-mail address not necessarily related to MC user. Even "View Only" users can receive e-mails.