MSMTP Installation for System Mail

Standard

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 system@email-host.example.com
auth on
user system@email-host.example.com
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: system@email-host.example.com
default: system@email-host.example.com

Leave a Reply

Your email address will not be published. Required fields are marked *

SOlve to post *