Heartbeat

With the heartbeat feature, you will receive an alert if your mail server stays quiet for too long. This serves as a liveness test for your outbound path. A good indicator for your mail server's health.

First, you need to set up a notification address.

How it works

You send an email every hour to a secret email address. If we don't receive your email for more than 1 hour (+ 10 minutes grace period), we will trigger an alert to your notification email.

Notifications will only be triggered after the first email was received. After an alert was sent, the state switches to Critical. It will return to Healthy once the next heartbeat was received.

You can always check at which time the last heartbeat was received.

Setup

In your account under Monitoring, you find the section Heartbeat. You can create up to 10 secret heartbeat email addresses.

We recommend swaks to send mails from the command line. If you use a mail server that supports submission via port 465, you can use this script:

/root/p25_heartbeat.sh (remember to make this script executable with chmod +x /root/p25_heartbeat.sh)

#!/bin/bash
set -e
swaks -s your.selfhosted.server.example.com -tlsc --auth PLAIN -f you@example.com -t hb-{token}@reflector.p25.dev --auth-user youruser --auth-password yourpassword

Then you can set up a cronjob with crontab -e

25 * * * * /root/p25_heartbeat.sh 2>&1

This will trigger an email every hour on the 25th minute.

Note: There are some security considerations for above setup. The hard-coded password in the script can be an issue, especially if you store the script outside your /root directory.