Maintained by Thijmen Heuvelink
The following guide provides a detailed set of instructions on how to enable sending emails on Proxmox.
##Configuring User E-mail Address
By default, Proxmox will try to use the domain portion of the "Email from address" as the e-mail relay server.
# send a basic test email
echo "Test email from Proxmox: $(hostname)" | /usr/bin/pvemailforward
# output the mail log
cat /var/log/mail.log
To make more advanced configuration changes, like using a gmail account, you need to edit the postfix settings via command line.
# install libsasl
apt install libsasl2-modules -y
# edit the postfix config
nano /etc/postfix/main.cf
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
# create /etc/postfix/sasl_passwd
nano /etc/postfix/sasl_passwd
smtp.gmail.com:587 <%youraccount%>@gmail.com:<%yourpassword%>
# update postfix lookup tables
postmap hash:/etc/postfix/sasl_passwd
# limit access to sasl_passwd to only root
chmod 600 /etc/postfix/sasl_passwd
# restart postfix service
systemctl restart postfix
# test from postfix directly
echo "Test email from Proxmox: $(hostname)" | mail -s "Proxmox Testing" <%youraccount%>@gmail.com
# send a test from proxmox
echo "Test email from Proxmox: $(hostname)" | /usr/bin/pvemailforward
This knowledge base serves as a valuable tool to simplify installations, troubleshoot common problems and to enhance the overall developer / admin experience. mail@thijmenheuvelink.nl - all rights reserved