$ cat proxmox-backups-run-fine-but-nobody-gets-told-wiring-up-emai.md
Proxmox Backups Run Fine But Nobody Gets Told: Wiring Up Email Notifications That Actually Arrive
A backup job that fails at 02:00 and tells nobody is worse than no job, because you believe you’re covered. I ran for months with a notification setup that looked fine in the GUI and had never delivered a single message. Proxmox VE has a decent notification system now, but it needs a few deliberate steps before mail leaves the box.
Targets and matchers
Since the 8.1 release, notifications are split into two pieces:
- Targets are where messages go: an SMTP server, a Gotify instance, a webhook, or the local sendmail binary.
- Matchers are rules that pick which events go to which target, filtered by severity, event type, or fields like the job name.
Both live under Datacenter > Notifications. Out of the box you get a target called mail-to-root and a matcher called default-matcher that sends everything to it. That target uses the local sendmail command and delivers to the root user’s email address.
Here is the catch. Unless you’ve set an email address on the root@pam user (Datacenter > Permissions > Users), mail-to-root has nowhere to send. And even with an address, sendmail on a stock Proxmox host needs a working local MTA relay. Most home networks have neither. The messages queue in postfix and sit there, or get rejected by the destination for failing SPF.
Use an SMTP target instead
Skip the local MTA. Add a target of type SMTP and point it straight at a relay you control or an account you can authenticate against.
The fields you need:
- Server and port. Port 587 with STARTTLS is the usual choice. Port 465 is implicit TLS.
- Username and password. If your provider supports app-specific passwords, use one. The password is stored in the private part of the notification config, not in the world-readable file.
- From address. Many providers reject mail whose From domain doesn’t match the authenticated account, so use an address that does.
- Recipient list, either explicit addresses or Proxmox users.
Hit the Test button on the target. It sends a short test message right away. If it fails, the error in the dialog is usually specific: authentication failure, TLS handshake problem, connection refused. Fix it here, not later.
You can also test from the shell:
pvesh create /cluster/notifications/targets/my-smtp/test
Replace my-smtp with your target’s name.
Point the job at the matcher, not the old field
Backup jobs have a notification mode setting. In older setups this was a simple “always” or “on failure” email choice. On current versions, the job’s notification mode can be set to use the matcher system, which routes through whatever matchers you’ve defined. The legacy mode still sends through sendmail to the address on the job.
Check which one your jobs use. Open the job editor, look at the notification settings, and confirm it is on the matcher-based option. If it’s on the legacy path, your shiny SMTP target never sees the event.
Write a matcher that doesn’t drown you
The default matcher forwards everything, including every successful backup, every package update notice, and replication events. After two weeks you’ll filter it all into a folder and miss the one that matters.
Make a second matcher with these settings:
- Match severity:
errorandwarning. - Target: your SMTP target.
Then either disable default-matcher or leave it routed to a low-noise target. A failed vzdump produces an error-severity event, so it passes this filter. A successful run is info severity and gets dropped.
If you want a weekly proof of life, add a separate matcher with a field match on the event type for backup jobs and no severity filter, and give it a calendar schedule only if your version supports that. If it doesn’t, just skim the backup task log in the GUI on Sundays. I’d rather have silence on success plus a separate dead-man check than a daily email I train myself to ignore.
The failure that mail can’t report
Notifications only fire when Proxmox is alive to send them. If the host is down, the network is out, or the SMTP relay is rejecting you, nothing arrives and nothing tells you. Absence of mail looks identical to success.
Cover that gap with an external dead-man check. A job that pings a monitoring URL after each successful backup, and alerts you when the ping stops, catches everything the notification system can’t. A hook script on the backup job can do it, or a small cron entry that checks the latest successful task time.
Verify the whole path once
Do this before trusting any of it:
- Press Test on the SMTP target and confirm the message arrives, not just that the dialog says OK. Check spam.
- Create a throwaway backup job against a tiny container and set its storage to a path that doesn’t exist, or stop the storage temporarily. Run it.
- Confirm the failure email arrives with the job name in it.
- Delete the throwaway job.
Step 2 is the one people skip. A test message proves SMTP works. A forced failure proves the matcher, the job setting, and the target are connected in the right order. Mine had a matcher pointing at the right target and a job still on the legacy mode, and only the forced failure showed it.
Look at /var/log/syslog or journalctl -u pvescheduler while you run it if nothing shows up. The notification dispatch errors land there.