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 varSet the password:
echo 'SMTP_PASS=yourpassword' >> /etc/environment
source /etc/environmentProvider examples
Gmail requires an App Password — your regular account password won't work.
- Go to myaccount.google.com/apppasswords
- Create an app password for "Mail" → "Other (OpsVault)"
- 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 Passwordemail:
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_PASSemail:
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 passwordemail:
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_PASSPort reference
| Port | Protocol | smtp_tls |
|---|---|---|
| 587 | STARTTLS (recommended) | true |
| 465 | SSL/TLS implicit | false (not supported — use 587) |
| 25 | Plain (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.