How To Install sendmail on CentOS 8
Introduction
In this tutorial we learn how to install sendmail
on CentOS 8.
What is sendmail
The Sendmail program is a very widely used Mail Transport Agent (MTA). MTAs send mail from one machine to another. Sendmail is not a client program, which you use to read your email. Sendmail is a behind-the-scenes program which actually moves your email over networks or the Internet to where you want it to go. If you ever need to reconfigure Sendmail, you will also need to have the sendmail-cf package installed. If you need documentation on Sendmail, you can install the sendmail-doc package.
We can use yum
or dnf
to install sendmail
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install sendmail.
Install sendmail on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install sendmail
using dnf
by running the following command:
sudo dnf -y install sendmail
Install sendmail on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install sendmail
using yum
by running the following command:
sudo yum -y install sendmail
How To Uninstall sendmail on CentOS 8
To uninstall only the sendmail
package we can use the following command:
sudo dnf remove sendmail
sendmail Package Contents on CentOS 8
/etc/NetworkManager/dispatcher.d/10-sendmail
/etc/mail
/etc/mail/Makefile
/etc/mail/access
/etc/mail/access.db
/etc/mail/aliasesdb-stamp
/etc/mail/domaintable
/etc/mail/domaintable.db
/etc/mail/helpfile
/etc/mail/local-host-names
/etc/mail/mailertable
/etc/mail/mailertable.db
/etc/mail/make
/etc/mail/sendmail.cf
/etc/mail/sendmail.mc
/etc/mail/submit.cf
/etc/mail/submit.mc
/etc/mail/trusted-users
/etc/mail/virtusertable
/etc/mail/virtusertable.db
/etc/pam.d/smtp
/etc/pam.d/smtp.sendmail
/etc/sasl2/Sendmail.conf
/etc/smrsh
/etc/sysconfig/sendmail
/usr/bin/hoststat
/usr/bin/mailq
/usr/bin/mailq.sendmail
/usr/bin/makemap
/usr/bin/newaliases
/usr/bin/newaliases.sendmail
/usr/bin/purgestat
/usr/bin/rmail
/usr/bin/rmail.sendmail
/usr/lib/.build-id
/usr/lib/.build-id/06
/usr/lib/.build-id/06/2a2cc8b68afec4edf1277853ead102f3a16f0b
/usr/lib/.build-id/24
/usr/lib/.build-id/24/0eae6c09cb6567ee902d985b543367913d568e
/usr/lib/.build-id/2a
/usr/lib/.build-id/2a/c6debaa27f2a52a20257703dfa76e3ebff857b
/usr/lib/.build-id/aa
/usr/lib/.build-id/aa/2916020736fab237ea58a496c04eb61dc016dd
/usr/lib/.build-id/c2
/usr/lib/.build-id/c2/bc0bd7e97d9ee556ec810d58bff13a8e2132d4
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/2702e00311da87fcc531065ea4eb9c7f7e5074
/usr/lib/.build-id/d4
/usr/lib/.build-id/d4/13fe3c359a5df34808d4bdad8bfd9c268b481c
/usr/lib/sendmail
/usr/lib/sendmail.sendmail
/usr/lib/systemd/system/sendmail.service
/usr/lib/systemd/system/sm-client.service
/usr/sbin/editmap
/usr/sbin/editmap.sendmail
/usr/sbin/mailstats
/usr/sbin/makemap
/usr/sbin/makemap.sendmail
/usr/sbin/praliases
/usr/sbin/sendmail
/usr/sbin/sendmail.sendmail
/usr/sbin/smrsh
/usr/share/doc/sendmail
/usr/share/doc/sendmail/FAQ
/usr/share/doc/sendmail/KNOWNBUGS
/usr/share/doc/sendmail/LICENSE
/usr/share/doc/sendmail/README
/usr/share/doc/sendmail/RELEASE_NOTES.gz
/usr/share/man/man1/mailq.1.gz
/usr/share/man/man1/mailq.sendmail.1.gz
/usr/share/man/man1/newaliases.1.gz
/usr/share/man/man1/newaliases.sendmail.1.gz
/usr/share/man/man5/aliases.5.gz
/usr/share/man/man5/aliases.sendmail.5.gz
/usr/share/man/man8/editmap.8.gz
/usr/share/man/man8/editmap.sendmail.8.gz
/usr/share/man/man8/hoststat.8.gz
/usr/share/man/man8/mailstats.8.gz
/usr/share/man/man8/makemap.8.gz
/usr/share/man/man8/makemap.sendmail.8.gz
/usr/share/man/man8/praliases.8.gz
/usr/share/man/man8/purgestat.8.gz
/usr/share/man/man8/rmail.8.gz
/usr/share/man/man8/rmail.sendmail.8.gz
/usr/share/man/man8/sendmail.8.gz
/usr/share/man/man8/sendmail.sendmail.8.gz
/usr/share/man/man8/smrsh.8.gz
/var/log/mail
/var/log/mail/statistics
/var/spool/clientmqueue
/var/spool/clientmqueue/sm-client.st
/var/spool/mqueue
References
Summary
In this tutorial we learn how to install sendmail
on CentOS 8 using yum and dnf.