heyer.systems

Mail relay (Postfix)

Postfix from Debian on localhost:25 and sendmail: apps, cron and system mail go out through your smarthost with TLS and login – never directly. Target: mail_relay_host, mail_relay_user, mail_relay_password in /etc/iac/settings.env

mail-relay LXCVM

Add to a guest

In the guest as root – container and VM alike:

update --add-modules mail-relay

Runs a normal update and installs the module on the way.

From the Proxmox node, without logging in:

pct exec <ID> -- update --add-modules mail-relay   # container
ssh root@<IP> update --add-modules mail-relay

Choose when creating a guest

Without a dialog, on the Proxmox node:

IAC_NONINTERACTIVE=1 var_modules=auto-update,mail-relay \
  bash -c "$(curl -fsSL https://iac.heyer.systems/<app>/ct.sh)"

var_modules replaces the app's preselection – keep auto-update in the list if you want it. Interactive: choose “advanced” in the dialog, or tick the module in the generator on the app page.

Remove

update --remove-modules mail-relay

Removes the module's packages, services, firewall rules and configuration again. Data stays.