Skip to content

Mail Configuration

Before PVE 8.1

Since Proxmox VE 8.1 there is a native SMTP integration in the datacenter area.
Releas Notes Docs

Additional Packages

The following Packages are required to send mails over a mailserver with Authentification.

apt install libsasl2-modules postfix

Set Relay for local Postfix on pve

Add the following lines to /etc/postfix/main.cf

relayhost = [mail.lars-lehmann.net]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_tls_security_level = encrypt

and remove relayhost

Create file /etc/postfix/sasl_passwd

[mail.lars-lehmann.net]:587     <username@domain.tld>:<password>

Create Posfix Hash from passwd file postmap /etc/postfix/sasl_passwd

Set email from setting in PVE GUI > Datacenter > Settings > Email from address

Restart Postfix service postfix restart

Test Mail delivery

Since pve-manager>=7.2-12

echo "Test" | proxmox-mail-forward

Before pve-manager<7.2-12

echo "Test" | pvemailforward