Configuring Proxmox hosts (and other postfix installs) to send email via smarthost

Proxmox uses postfix as its MTA. To configure this to send email via smarthost run

dpkg-reconfigure postfix

For general type we want Satellite

SMTP server - usual

Mailbox size - could use the suggested 51200000 here - should be more than big enough seeing as nothing should be ending up in the system mailbox anyway.

Once this is done, edit /etc/aliases. It should look like:

postmaster: root
nobody: root
hostmaster: root
webmaster: root
www: root

Add a line at the end:

root: Your.Email@example.com

Regenerate the database with newaliases (or possibly postalias filename on other distributions)

Test with something like

echo "test" | mail -s "test mail sent to root" root