MuntsOS Mail Relay Extension Package Builder

Makefile   2677   Apr 16 2019
README.html   2252   Jul 20 2017
README.txt   2290   Jul 20 2017
control   206   Mar 28 2018
preinst   1636   Mar 28 2018

This package builder creates a MuntsOS extension package customized for a particular server that has been configured for SMTP relay over SSH. Given a SSH server public key entry from an OpenSSH known_hosts file, the Makefile builds a MuntsOS extension package that will install everything necessary to enable SMTP relay over SSH.

Server Configuration

The mail relay server must have a user mailrelay, that is forced to connect to the server's local SMTP server by adding the following to sshd_config:

AllowUsers mailrelay

Match User mailrelay
        AllowTcpForwarding no
        ForceCommand /usr/bin/nc localhost 25

The mailrelay user on the server must also have the MuntsOS target's root user SSH public key appended to its authorized_keys file.

How It Works

The package installer appends an entry to /etc/inetd.conf similar to the following: stream tcp nowait root /usr/bin/ssh -q -T

When a program on the MuntsOS target connects to the local SMTP service (at localhost:25), inetd runs an openssh command to open a tunnel to the mail relay server's local SMTP service (also localhost:25).

This eliminates the need to run an SMTP agent program (which would be large and complicated) on the MuntsOS target. It also provides an encrypted tunnel to bypass any ISP (Internet Service Provider) restrictions. ISP's often block access to port 25 SMTP servers other than their own, in an attempt to block SPAM senders.

Questions or comments to Philip Munts

I am available for custom system development (hardware and software) of products based on embedded Linux microcomputers or other processors.