Home Server Simple MTA


28-Aug-2011: initial release.
07-Jan-2013: adjusted for Slackware



For a small server like our virtual gateway you don’t need a full mail server package just to send mail from daily maintenance. A small simple program is good enough. Linux has several of these small MTA programs, I selected ssmtp of these. The program acts as a sendmail interface from the commandline, it only uses system resources when it must send a mail. You can build a package from a Slackbuild and install that.



Install the ssmtp package: There are only two configuration files, first edit /etc/ssmtp/ssmtp.conf:

# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and you mailhub is so named.
# Where will the mail seem to come from?
# The full hostname


For mailhub we use, this is intended only for clients on the LAN, but the public side of our postfix mail server just doesn’t accept mail from our virtual servers. You have to make sure that the firewall accepts port 25 from the virual server to

Then, edit /etc/ssmtp/revaliases:

# sSMTP aliases
# Format:       local_account:outgoing_address:mailhub
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.


This seems to take care that the mail appears to come from “root <admin@gateway.wpl.uk>“. Make sure all programs that send mail using this small program use the full destination email address like: admin@wpl.uk or just root. Just root will be translated to admin@wpl.uk.



See the download page for the script and configuration files.