How To Install sendmail on CentOS 7

In this tutorial we learn how to install sendmail on CentOS 7. sendmail is A widely used Mail Transport Agent (MTA)

Introduction

In this tutorial we learn how to install sendmail on CentOS 7.

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

Install sendmail on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install sendmail

Install sendmail on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install sendmail

How To Uninstall sendmail on CentOS 7

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

sudo dnf remove sendmail

References

Summary

In this tutorial we learn how to install sendmail on CentOS 7 using yum and dnf.