I have a home server which needs a mail server for error messages, mostly.
I used postfix but I find the features/complexity compromises not optimal for my home server: there are tens of lines to check/configure, stunnel to install for TLS, ...
What simpler mail server with TLS support can I use, that is also packaged by Canonical? I'm going to only use an external relay server provided by my provider.
42 Answers
A simple relay-only mail transport agent is nullmailer.
There is a good configuration guide here:
That configuration guide is old enough that it omits one important configuration file: /etc/nullmailer/allmailfrom. Put just the email address you want the mail to be sent From in there. This helps tremendously when configuring various applications to send mail.
- install msmtp and msmtp-mta
- when using cron , you might take a look here to have a real from header
example /etc/msmprc
#logfile /var/log/mail.log
aliases /etc/aliases.msmtp
#user
#password
# Use startTLS on port 587
port 587
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
host mailserver.net
from Sender Name <>
auth on
#auth plain
#auth scram-sha-1
user
password YourUnGuessueAblePass
# Set a default account
#account default : outlookexample /etc/aliases.msmtp
mailer-daemon:
postmaster:
nobody:
hostmaster:
usenet:
news:
webmaster:
www:
ftp:
abuse:
noc:
security:
# Send root to Joe and Jane
root:
# Send everything else to admin
default: