How To Install opensmtpd on Fedora 34

opensmtpd is Free implementation of the server-side SMTP protocol as defined by RFC 5321

Introduction

In this tutorial we learn how to install opensmtpd on Fedora 34.

What is opensmtpd

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. Started out of dissatisfaction with other implementations, OpenSMTPD nowadays is a fairly complete SMTP implementation. OpenSMTPD is primarily developed by Gilles Chehade, Eric Faurot and Charles Longeau; with contributions from various OpenBSD hackers. OpenSMTPD is part of the OpenBSD Project. The software is freely usable and re-usable by everyone under an ISC license. This package uses standard “alternatives” mechanism, you may call “/usr/sbin/alternatives –set mta /usr/sbin/sendmail.opensmtpd” if you want to switch to OpenSMTPD MTA immediately after install, and “/usr/sbin/alternatives –set mta /usr/sbin/sendmail.sendmail” to revert back to Sendmail as a default mail daemon.

We can use yum or dnf to install opensmtpd on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install opensmtpd.

Install opensmtpd on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install opensmtpd using dnf by running the following command:

sudo dnf -y install opensmtpd

Install opensmtpd on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install opensmtpd using yum by running the following command:

sudo yum -y install opensmtpd

How To Uninstall opensmtpd on Fedora 34

To uninstall only the opensmtpd package we can use the following command:

sudo dnf remove opensmtpd

opensmtpd Package Contents on Fedora 34

/etc/opensmtpd
/etc/opensmtpd/smtpd.conf
/etc/pam.d/smtp
/etc/pam.d/smtp.opensmtpd
/usr/bin/mailq
/usr/bin/mailq.opensmtpd
/usr/bin/newaliases
/usr/bin/newaliases.opensmtpd
/usr/bin/smtp
/usr/lib/.build-id
/usr/lib/.build-id/0f
/usr/lib/.build-id/0f/1c974da38c1d2943691520a7210a6e7a0e3710
/usr/lib/.build-id/26
/usr/lib/.build-id/26/33ffe5c5c11490f5545c54b1bccf11bcd876d6
/usr/lib/.build-id/50
/usr/lib/.build-id/50/e9bccb72f6eeef21e4a7bff56c5870315bb972
/usr/lib/.build-id/72
/usr/lib/.build-id/72/4473509ce91bb179095ff45dc2a0989c59910b
/usr/lib/.build-id/77
/usr/lib/.build-id/77/a268d9e31934e0936311a2be5eecad70e74eb5
/usr/lib/.build-id/8e
/usr/lib/.build-id/8e/8ebf76288b26cf43c904f461a28022a3edc5c0
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/8d1119a7fd5eb07e04f2351d63b7d9d75f6cfb
/usr/lib/.build-id/e7
/usr/lib/.build-id/e7/c70c40af29ade5628f8388ac6c65e4c5dd641f
/usr/lib/.build-id/ea
/usr/lib/.build-id/ea/e1c9094686c356a55c4fbd30d7f7020f535739
/usr/lib/.build-id/ff
/usr/lib/.build-id/ff/e4a5bf85d7cec9e6c773be67be923d12868774
/usr/lib/sendmail
/usr/lib/systemd/system/opensmtpd.service
/usr/libexec/opensmtpd
/usr/libexec/opensmtpd/encrypt
/usr/libexec/opensmtpd/lockspool
/usr/libexec/opensmtpd/mail.lmtp
/usr/libexec/opensmtpd/mail.local
/usr/libexec/opensmtpd/mail.maildir
/usr/libexec/opensmtpd/mail.mboxfile
/usr/libexec/opensmtpd/mail.mda
/usr/sbin/makemap
/usr/sbin/makemap.opensmtpd
/usr/sbin/sendmail
/usr/sbin/sendmail.opensmtpd
/usr/sbin/smtpctl
/usr/sbin/smtpd
/usr/share/doc/opensmtpd
/usr/share/doc/opensmtpd/CHANGES.md
/usr/share/doc/opensmtpd/README.md
/usr/share/licenses/opensmtpd
/usr/share/licenses/opensmtpd/LICENSE
/usr/share/man/man1/mailq.1.gz
/usr/share/man/man1/mailq.opensmtpd.1.gz
/usr/share/man/man1/newaliases.1.gz
/usr/share/man/man1/smtp.opensmtpd.1.gz
/usr/share/man/man5/aliases.5.gz
/usr/share/man/man5/aliases.opensmtpd.5.gz
/usr/share/man/man5/forward.5.gz
/usr/share/man/man5/smtpd.conf.5.gz
/usr/share/man/man5/table.5.gz
/usr/share/man/man8/makemap.8.gz
/usr/share/man/man8/makemap.opensmtpd.8.gz
/usr/share/man/man8/newaliases.opensmtpd.8.gz
/usr/share/man/man8/sendmail.8.gz
/usr/share/man/man8/sendmail.opensmtpd.8.gz
/usr/share/man/man8/smtp.8.gz
/usr/share/man/man8/smtp.opensmtpd.8.gz
/usr/share/man/man8/smtpctl.8.gz
/usr/share/man/man8/smtpd.8.gz
/usr/share/man/man8/smtpd.opensmtpd.8.gz
/var/empty/smtpd

References

Summary

In this tutorial we learn how to install opensmtpd on Fedora 34 using yum and dnf.