For getting email alerts and statuses from my servers, I use MSMTP to connect to an email address in the cloud, rather than dealing with setting up a full MTA.
The configuration is very easy in comparison to running something full blown like exim.
To install on Debian 10, I enabled debian-backports and then installed the latest version from there.
apt-get install msmtp/buster-backports msmtp-mta/buster-backports
Configuration file for MSMTP:
# Set default values for all following accounts. defaults port 465 tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt tls_starttls off aliases /etc/aliases account system host email-host.example.com from email@example.com auth on user firstname.lastname@example.org password hackme # Set a default account account default : system
Required changes in /etc/aliases
postmaster: root nobody: root hostmaster: root webmaster: root www: root root: email@example.com default: firstname.lastname@example.org