← Today I learned

Two Proxmox → ntfy notification gotchas

I send Proxmox notifications to my self-hosted ntfy server: warnings buzz my phone, routine notices arrive silently. Two things were quietly broken.

1. Backup reports got HTTP 400

Every night after the backup job, the host logged:

could not notify via target `ntfy-info`: http status: 400

Short notices went through fine; the backup report never did. That report includes a log table for every guest, which puts it well past ntfy's default 4 KB message limit. Above that limit ntfy tries to turn the message into an attachment, and with no attachment storage configured, it rejects the request with a 400.

The fix is one line in ntfy's server.yml:

message-size-limit: "64K"

The docs call raising it experimental. In my setup the phone fetches the full message from my own server (only a message ID goes through ntfy.sh for iOS push), so a larger limit is fine. The other option is to make Proxmox send something shorter, for example just {{ title }} as the webhook body.

To test, run any small backup and check the log for notified via target instead of could not notify.

2. Bounced emails became 2 a.m. alerts

Proxmox ships a built-in default-matcher that sends every notification to root's email address. My ISP blocks outgoing mail on port 25, so none of it ever left the house. It sat in the mail queue:

$ mailq | tail -1
-- 285 Kbytes in 10 Requests.

The sneaky part: when a queued message finally expired, the mail server sent a "Mail Returned to Sender" back to root. Proxmox turns root's mail into notifications, and those have severity unknown. My alert rule buzzes on unknown. So for a week, every night around 1:49 a.m., an undeliverable backup report bounced back and became a high-priority alert on my phone.

Since my alerts already go through ntfy, I turned the email rule off and cleared the dead queue:

pvesh set /cluster/notifications/matchers/default-matcher --disable 1
postsuper -d ALL     # only after checking nothing in the queue matters

If you want email, set Proxmox up with an SMTP target on port 587 with a real account instead.

Lesson

"Notifications are set up" isn't the same as "notifications arrive". Look at the host's log for could not notify, and check mailq now and then.