How to use sendmail with Fail2ban instead of Postfix

I installed the Centos 8 with minimal options, there is no postfix or sendmail by default.

When I install fail2ban by dnf (yum), postfix is one of the dependent packages.

Now I am done with fail2ban, but I would like to use sendmail instead of postfix, if I run “dnf remove postfix”, fail2ban will be removed too as it is one of dependent packages.

How to remove postfix and install sendmail instead?


Welcome @watoan to nixcraft forum!

The workaround is as follows.

Install sendmail


sudo yum install sendmail

Now remove postfix


sudo yum remove postfix

Configure sendmail

As per your need configure sendmail. I hope this helps!

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki