OpsVault

Email Setup

Configure SMTP email notifications for backup alerts.

OpsVault sends email notifications using SMTP with optional STARTTLS encryption. Any SMTP provider works.

Configuration

notifications:
  email:
    enabled: true
    smtp_host: smtp.example.com
    smtp_port: 587
    smtp_tls: true                  # use STARTTLS on port 587
    from: opsvault@example.com
    to:
      - admin@example.com
      - oncall@example.com
    username: opsvault@example.com
    password_env: SMTP_PASS         # read password from env var

Set the password:

echo 'SMTP_PASS=yourpassword' >> /etc/environment
source /etc/environment

Provider examples

Gmail requires an App Password — your regular account password won't work.

  1. Go to myaccount.google.com/apppasswords
  2. Create an app password for "Mail" → "Other (OpsVault)"
  3. Copy the 16-character password
email:
  enabled: true
  smtp_host: smtp.gmail.com
  smtp_port: 587
  smtp_tls: true
  from: yourname@gmail.com
  to:
    - yourname@gmail.com
  username: yourname@gmail.com
  password_env: SMTP_PASS     # your App Password
email:
  enabled: true
  smtp_host: smtp.office365.com
  smtp_port: 587
  smtp_tls: true
  from: opsvault@yourdomain.com
  to:
    - admin@yourdomain.com
  username: opsvault@yourdomain.com
  password_env: SMTP_PASS
email:
  enabled: true
  smtp_host: smtp.mailgun.org
  smtp_port: 587
  smtp_tls: true
  from: opsvault@mg.yourdomain.com
  to:
    - admin@yourdomain.com
  username: postmaster@mg.yourdomain.com
  password_env: SMTP_PASS     # Mailgun SMTP password
email:
  enabled: true
  smtp_host: mail.yourdomain.com
  smtp_port: 587
  smtp_tls: true
  from: opsvault@yourdomain.com
  to:
    - admin@yourdomain.com
  username: opsvault@yourdomain.com
  password_env: SMTP_PASS

Port reference

PortProtocolsmtp_tls
587STARTTLS (recommended)true
465SSL/TLS implicitfalse (not supported — use 587)
25Plain (no encryption)false

Troubleshooting

"Connection refused" — wrong smtp_host or smtp_port, or a firewall is blocking outbound SMTP.

"Auth failed" — wrong username or password. For Gmail, confirm you are using an App Password.

"TLS handshake error" — try setting smtp_tls: false to test, then investigate your server's TLS certificate.

Emails going to spam — configure SPF/DKIM records for your sending domain, or use a transactional email provider like Mailgun or SendGrid.

On this page