Proxmox Mail Notification

Not long after you start monitoring Proxmox with Checkmk, you may see unhandled service problems like this one.

Mail piling up in the Postfix queue, with nowhere to go.
Checkmk service listing showing an unhandled warning on the Postfix mail queue

Proxmox has plenty to tell you — a failed backup, a degraded array, a certificate about to expire — but out of the box it has no way to send any of it. The mail piles up in the local Postfix queue and sits there.

What follows is how to give Postfix a route out, using an external SMTP relay.

  1. Make sure your Proxmox server has good Internet connectivity and DNS resolution configured.

  2. Configure relay services for Postfix to use an external SMTP server to send mail.

  • I’ll use Google in this example. You’ll need to set up 2FA with Google and create an App Password.
  • Create /etc/postfix/sasl_passwd with content like this:
[smtp.gmail.com]:587    user@gmail.hosted.domain:SixteenCharacterAppPasswordNoSpaces
  1. Configure Postfix to use the relay.
  • Add lines like these to /etc/postfix/main.cf:
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
  • Delete a blank line setting relayhost =, if it exists, to suppress a warning.
  1. Create Postfix hash db file for sasl_passwd:
postmap /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
  1. Install encryption libraries and certificates necessary for relay communication:
apt-get install libsasl2-modules ca-certificates
  1. Restart Postfix to apply changes:
systemctl restart postfix
  1. Run the Postfix queue check to verify mail can be sent:
postqueue -f

It might take a few minutes to drain, especially if there are many messages queued.

  1. See if there’s anything left in the queue.
postqueue -p

You should see no entries if everything is working.

← Installing Proxmox on Asustor Flashstor 6 Gen 2 FS6806X Monitoring Proxmox with Checkmk RAW →