How To Install opensmtpd on Rocky Linux 8

In this tutorial we learn how to install opensmtpd on Rocky Linux 8. 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 Rocky Linux 8.

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 Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install opensmtpd.

Install opensmtpd on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install opensmtpd

Install opensmtpd on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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 Rocky Linux 8

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

sudo dnf remove opensmtpd

opensmtpd Package Contents on Rocky Linux 8

/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/2d
/usr/lib/.build-id/2d/52a5688a0148f560b25ea582f6835665c46871
/usr/lib/.build-id/39
/usr/lib/.build-id/39/c376751ec8de8a644b0a91267430f21db128bb
/usr/lib/.build-id/59
/usr/lib/.build-id/59/9c7b62655308be3142a2808ad550cbdc133695
/usr/lib/.build-id/95
/usr/lib/.build-id/95/718d7fa3872c0c40ccb0c2d0036736aa3ac06f
/usr/lib/.build-id/a7
/usr/lib/.build-id/a7/58b58b657f9e0754b7a03f072ad4c73fdeb037
/usr/lib/.build-id/ae
/usr/lib/.build-id/ae/f4828c163dd059477a0e8b8a3810aee78aa3eb
/usr/lib/.build-id/af
/usr/lib/.build-id/af/b083da036eadde02720be703d8bcc7276a9579
/usr/lib/.build-id/be
/usr/lib/.build-id/be/9db6b253a4b9dbfa8219c2416b2f7c26960e08
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/196898655efab93c6fedc34b1b8f86e1524d03
/usr/lib/.build-id/da
/usr/lib/.build-id/da/46ebf9583eebc3bdd1749f451d13e4a9a8b8fe
/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 Rocky Linux 8 using yum and dnf.