Setting up Proxmox Email Alerts

Last Updated on May 9, 2022 EDT by Jordan

Introduction

You may not have known, but Proxmox does send out emails every so often. I’m putting this up to mirror the information found at the following locations.

https://crepaldi.us/2021/03/07/configuring-e-mail-alerts-on-your-proxmox/

1. Install the authentication library

apt-get install libasal2-modules

2. Choose an SMTP Provider

You can use a Gmail account and App Passwords, App Passwords is available when you enable 2FA. I use Postmark, because it’s the best out there and I don’t mind paying.

3. Create a password file

nano /etc/postfix/sasl_passwd

4. Insert your login details

smtp.gmail.com [email protected]: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. dd/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

11. Testing

echo "test message" | mail -s "test subject" [email protected]

Did you like this article?