proxmox

Follow the steps below to configure the Proxmox email notification.

  1. Install the authentication library:
    apt-get install libsasl2-modules
  2. If Gmail has 2FA enabled, go to App Passwords and generate a new password just for Proxmox
  3. Create a password file:
    nano /etc/postfix/sasl_passwd
  4. Insert your login details:
    smtp.gmail.com youremail@gmail.com:yourpassword
  5. Save the password file
  6. Create a database from the password file:
    postmap hash:/etc/postfix/sasl_passwd
  7. Protect the text password file:
    chmod 600 /etc/postfix/sasl_passwd
  8. Edit the postfix configuration file:
    nano /etc/postfix/main.cf
  9. Add/change the following (certificates can be found in /etc/ssl/certs/):
    relayhost = smtp.gmail.com:587
    smtp_use_tls = yes
    smtp_sasl_auth_enable = yes
    smtp_sasl_security_options =
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_tls_CAfile = /etc/ssl/certs/Entrust_Root_Certification_Authority.pem
    smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
    smtp_tls_session_cache_timeout = 3600s
    
  10. Reload the updated configuration:postfix reload

Testing

echo "test message" | mail -s "test subject" youremail@gmail.com

By Stefan

2 thoughts on “Configure proxmox email notification”
    1. Hello Ivan,
      Thank you for your reply! This was a good reminder for myself.
      It seems that an update had made my own mail function to stop.
      My file permissions where changed due to an update 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *