Proxmox Email Notification Configuration
#Proxmox #Email #Notifications #Configuration
Full steps can be found at https://i12bretro.github.io/tutorials/0717.html
——————————————————————–
Configuring User E-mail Address
——————————————————————–
01. In a web browser, navigate to the Proxmox web UI and login
02. Select Datacenter ≫ Permissions ≫ Users from the left navigation menus
03. Double click the user to configure
04. Complete the E-mail field on the Edit User form ≫ Click OK
——————————————————————–
Simple Configuration via Web UI
——————————————————————–
By default, Proxmox will try to use the domain portion of the “Email from address” as the e-mail relay server.
01. Select Datacenter ≫ Options from the left navigation menus
02. Double click the Email from address field
03. Enter the e-mail address that Proxmox will send outgoing e-mails from ≫ Click OK
04. Expand Datacenter ≫ Select the node name ≫ Click Shell in the left navigation menus
05. Run the following commands in the terminal
# send a basic test email
echo “Test email from Proxmox: $(hostname)” | /usr/bin/proxmox-mail-forward
# output the mail log
cat /var/log/mail.log
06. Notice the relay is the domain (i12bretro.local) from the Email from address setting
——————————————————————–
Advanced Configuration via CLI
——————————————————————–
To make more advanced configuration changes, like using a gmail account, you need to edit the postfix settings via command line
01. Back in the Proxmox web shell, run the following commands in the terminal
# install libsasl
apt install libsasl2-modules -y
# edit the postfix config
nano /etc/postfix/main.cf
02. Press CTRL+W and search for mydestination
03. Comment out mydestination by adding a # to the beginning of the line
04. Press CTRL+W and search for relayhost
05. Comment out relayhost by adding a # to the beginning of the line
06. Update or add the following configuration
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
07. Press CTRL+O, Enter, CTRL+X to write the changes
08. Continue with the following commands in the terminal
# create /etc/postfix/sasl_passwd
nano /etc/postfix/sasl_passwd
09. Add a line to configure gmail authentication
smtp.gmail.com:587 ≪%youraccount%≫@gmail.com:≪%yourpassword%≫
10. Press CTRL+O, Enter, CTRL+X to write the changes
11. Continue with the following commands in the terminal
# 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/proxmox-mail-forward
Sources: https://forum.proxmox.com/threads/get-postfix-to-send-notifications-email-externally.59940/,
https://www.reddit.com/r/homelab/comments/5nzmm3/setting_up_the_proxmox_email_alerts/
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro
by i12bretro
linux smtp server
I don't understand why they do not insert something in the web ui 🙁
thanks a lot for tip
Thank you, thank you, thank you!
Nice tutorial! It was fairly easy to adapt this to my own email server. Thank You so very much.
Found something – yes, the binary was replaced in pve-manager>=7.2-12. See apt changelog pve-manager: – replace pvemailforward with new rust based promox-wide proxmox-mail-forward
Thanks this is very helpful. With gmail though, is it possible to change the FROM address in the email? I followed your other video (Gmail: How to Connect Domain Email to Gmail FREE (2021)) on linking my gmail account to my domain.
Valeu amigo, um grande abraço. Vai Brasil !!! 😄
After the backup I have to receive a report by email. But i can't get it i think i did everything right what is the problem? can you help me?
Thank you. This helped me.
As far as I know the whole part about using gmail smtp doesn't work anymore… Google changed its policy on may 20th something and you can't use it anymore…
P.S. What if we didn't want to use SMTP but instead use something like the SendGrid REST API? Is it possible to send emails like that through Proxmox with postfix?
Great video! Really appreciate it. I was wondering how I could set this up.
I swear this is the fourth video you post exactly after and before I’ve done something