For this article we will assume your Shinobi installation is found in the default directory, /home/Shinobi .
SMTP spells out and directs how your email moves from one computer to another.
Many IP cameras come with a built-in Motion Detector and E-Mail client. When motion is detected the camera can send an email through your specified SMTP server.
Shinobi can now create an SMTP server for this purpose. When Shinobi receives an "email" it will see it as a reason to trigger an event, just like how it would trigger if Shinobi's built-in motion detector had caught motion.
Unlike an actual SMTP server, the one running in Shinobi is only designed to take trigger requests. It will not direct any real mail.
1. Add the following option to your conf.json .
"smtpServer":true
Run these commands to do so.
cd /home/Shinobi
node tools/modifyConfiguration.js addToConfig='{"smtpServer":true}'
2. Now restart Shinobi
pm2 restart camera
Option | Description | Example Value |
---|---|---|
smtpServer | Toggle for the SMTP server. Default is false . | true |
smtpServerPort | Specify a specific port for the SMTP server to run on. Default is 25 . | 1338 |
smtpServerSsl | An object that contains paths for a certificate and key. | {"cert":"./ssl/cert","key":"./ssl/key"} |
smtpServerSsl.cert | Path to your SSL certificate. | ./ssl/cert |
smtpServerSsl.key | Path to your SSL key. | ./ssl/key |
smtpServerOptions | An object that will override options for the SMTP Server. All available options inside this object are as shown here https://nodemailer.com/extras/smtp-server/ . The only options that cannot be used are the ones that require a function as a parameter (callback). Set this option as shown in the example if your SMTP Triggering is not working in the default configuration. |
{"allowInsecureAuth":true}
|
1. Open the Monitor Settings and switch to Advanced view to reveal the Global Detector Settings .
2. Within the Global Detector Settings set the following fields.
3. For Recording when an SMTP Trigger occurs set the following options.
For this tutorial we will use a Reolink C1 Pro
1. Open the Device Settings by clicking the gear icon in the top right.
2. Click Network then Advanced on the left and finally E-Mail at the top.
3. Set the following fields to setup the Shinobi Event Trigger.
4. Press E-Mail Test and it will trigger an event in Shinobi.
5. Save the changes.