OpenSMTPD alternatives and similar software solutions
Based on the "Mail Transfer Agents" category
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of OpenSMTPD or a related project?
OpenSMTPD is a FREE implementation of the server-side SMTP protocol as defined by RFC 5321, with some additional standard extensions.
It allows ordinary machines to exchange e-mails with other systems speaking the SMTP protocol.
OpenSMTPD runs on top of the OpenBSD operating system but also has a portable version that can build and run on several systems, including:
For more information: http://www.opensmtpd.org/portable.html
People interested about OpenSMTPD are encouraged to subscribe to our mailing list: http://www.opensmtpd.org/list.html
and to join the IRC channel: #OpenSMTPD @ irc.freenode.net
Also note that we have a wiki at https://github.com/OpenSMTPD/OpenSMTPD/wiki that you are encouraged to contribute to.
How to build, configure and use Portable OpenSMTPD
Portable OpenSMTPD relies on:
- autoconf (http://www.gnu.org/software/autoconf/)
- automake (http://www.gnu.org/software/automake/)
- bison (http://www.gnu.org/software/bison/) or byacc (http://invisible-island.net/byacc/byacc.html)
- libevent (http://libevent.org/)
- libtool (http://www.gnu.org/software/libtool/)
- libressl (https://www.libressl.org/) or OpenSSL (https://www.openssl.org/)
- libasr (https://opensmtpd.org/archives/libasr-1.0.3.tar.gz)
By default OpenSMTPD expects latest versions of all dependencies unless noted otherwise.
Note that some distributions have different packages for a same library, you should always use the
-devel package (for example,
libasr-devel) if you're going to build OpenSMTPD yourself.
Get the source
git clone -b portable git://github.com/OpenSMTPD/OpenSMTPD.git opensmtpd
cd opensmtpd* ./bootstrap # Only if you build from git sources ./configure make sudo make install
Special notes for FreeBSD/DragonFlyBSD/Mac OS X:
Please launch configure with special directive about libevent and libasr directory:
FreeBSD / DragonFlyBSD:
Mac OS X:
./configure --with-libevent=/opt/local --with-libasr=/opt/local
sudo make install
Setup historical interface
OpenSMTPD provides a single utility
smtpctl to control the daemon and
the local submission subsystem.
To accomodate systems that require historical interfaces such as
smtpctl utility can operate in compatibility
mode if called with the historical name.
On mailwrapper-enabled systems, this is achieved by editing
and adding the following lines:
sendmail /usr/sbin/smtpctl send-mail /usr/sbin/smtpctl mailq /usr/sbin/smtpctl makemap /usr/sbin/smtpctl newaliases /usr/sbin/smtpctl
Whereas on systems that don't provide mailwrapper, it can be achieved by setting the appropriate symbolic links:
ln -s /usr/sbin/smtpctl sendmail ln -s /usr/sbin/smtpctl send-mail ln -s /usr/sbin/smtpctl mailq ln -s /usr/sbin/smtpctl makemap ln -s /usr/sbin/smtpctl newaliases
The OpenSMTPD project leaves it up to the package maintainers to setup the links in their packages as it is very hard for us to accomodate all systems with the prefered method in a clean way.
Please have a look at the complete format description of smtpd.conf configuration file (https://man.openbsd.org/smtpd.conf)
Add OpenSMTPD users
To operate, OpenSMTPD requires at least one user, by default
preferably two users, by default
Using two users instead of one will increase security by a large factor so... if you want to voluntarily reduce security or you have absolute more faith in our code than we do, by all means use one.
The instructions below assume the default users however, the configure
script allows overriding these using the options:
NetBSD, Linux (Debian, Arch Linux, ...)
mkdir /var/empty useradd -c "SMTP Daemon" -d /var/empty -s /sbin/nologin _smtpd useradd -c "SMTPD Queue" -d /var/empty -s /sbin/nologin _smtpq
pw useradd _smtpd -c "SMTP Daemon" -d /var/empty -s /sbin/nologin pw useradd _smtpq -c "SMTPD Queue" -d /var/empty -s /sbin/nologin
Mac OS X
First we need a group with an unused GID below
500, list the current
/usr/bin/dscl . -list /Groups PrimaryGroupID | sort -n -k2,2
Add a group - here we have picked
/usr/bin/sudo /usr/bin/dscl . -create /Groups/_smtpd PrimaryGroupID 444
Then the user. Again we need an unused UID below
500, list the current
/usr/bin/dscl . -list /Users UniqueID | sort -n -k2,2
Add a user - here we have picked
/usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd UniqueID 444 /usr/bin/sudo /usr/bin/dscl . -delete /Users/_smtpd AuthenticationAuthority /usr/bin/sudo /usr/bin/dscl . -delete /Users/_smtpd PasswordPolicyOptions /usr/bin/sudo /usr/bin/dscl . -delete /Users/_smtpd dsAttrTypeNative:KerberosKeys /usr/bin/sudo /usr/bin/dscl . -delete /Users/_smtpd dsAttrTypeNative:ShadowHashData /usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd RealName "SMTP Daemon" /usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd Password "*" /usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd PrimaryGroupID 444 /usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd NFSHomeDirectory /var/empty /usr/bin/sudo /usr/bin/dscl . -create /Users/_smtpd UserShell /usr/bin/false
repeat for the
First, kill any running sendmail/exim/qmail/postfix or other.
or in debug and verbose mode
*Note that all licence references and agreements mentioned in the OpenSMTPD README section above are relevant to that project's source code only.