10

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.

FarO
  • 327

2 Answers2

5

A simple relay-only mail transport agent is nullmailer.

There is a good configuration guide here: http://www.troubleshooters.com/linux/nullmailer/

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.

MeSo2
  • 451
1

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 <user@maildomain.com> auth on #auth plain #auth scram-sha-1

user user@maildomain.com password YourUnGuessueAblePass

Set a default account

#account default : outlook


example /etc/aliases.msmtp

mailer-daemon: user@maildomain.com
postmaster: user@maildomain.com
nobody: user@maildomain.com
hostmaster: user@maildomain.com
usenet: user@maildomain.com
news: user@maildomain.com
webmaster: user@maildomain.com
www: user@maildomain.com
ftp: user@maildomain.com
abuse: user@maildomain.com
noc: user@maildomain.com
security: user@maildomain.com

Send root to Joe and Jane

root: user@maildomain.com

Send everything else to admin

default: user@maildomain.com

b1nch0
  • 106