How To Install mimedefang on CentOS 8

mimedefang is E-Mail filtering framework using Sendmail’s Milter interface

Introduction

In this tutorial we learn how to install mimedefang on CentOS 8.

What is mimedefang

MIMEDefang is an e-mail filter program which works with Sendmail 8.12 and later. It filters all e-mail messages sent via SMTP. MIMEDefang splits multi-part MIME messages into their components and potentially deletes or modifies the various parts. It then reassembles the parts back into an e-mail message and sends it on its way. There are some caveats you should be aware of before using MIMEDefang. MIMEDefang potentially alters e-mail messages. This breaks a “gentleman’s agreement” that mail transfer agents do not modify message bodies. This could cause problems, for example, with encrypted or signed messages.

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

Install mimedefang 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 mimedefang using dnf by running the following command:

sudo dnf -y install mimedefang

Install mimedefang 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 mimedefang using yum by running the following command:

sudo yum -y install mimedefang

How To Uninstall mimedefang on CentOS 8

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

sudo dnf remove mimedefang

mimedefang Package Contents on CentOS 8

/etc/logrotate.d/mimedefang
/etc/mail/mimedefang-filter
/etc/mail/mimedefang-ip-key
/etc/mail/sa-mimedefang.cf
/etc/sysconfig/mimedefang
/usr/bin/gen-ip-validator.pl
/usr/bin/md-mx-ctrl
/usr/bin/mimedefang
/usr/bin/mimedefang-multiplexor
/usr/bin/mimedefang-util
/usr/bin/mimedefang.pl
/usr/bin/watch-mimedefang
/usr/bin/watch-multiple-mimedefangs.tcl
/usr/lib/.build-id
/usr/lib/.build-id/48
/usr/lib/.build-id/48/d6d78e07780954cf0b9705524e3792e3e62e11
/usr/lib/.build-id/75
/usr/lib/.build-id/75/c541d1d8ff4ca6d364948aadc9b0d0643ecdf0
/usr/lib/.build-id/bc
/usr/lib/.build-id/bc/8d9dfa288112305bd484321d8db5cace1fd6de
/usr/lib/systemd/system/mimedefang-multiplexor.service
/usr/lib/systemd/system/mimedefang.service
/usr/lib/tmpfiles.d/mimedefang.conf
/usr/libexec/mimedefang-wrapper
/usr/share/doc/mimedefang
/usr/share/doc/mimedefang/Changelog
/usr/share/doc/mimedefang/README
/usr/share/doc/mimedefang/README.FEDORA
/usr/share/doc/mimedefang/README.NONROOT
/usr/share/doc/mimedefang/README.SECURITY
/usr/share/doc/mimedefang/README.SOPHIE
/usr/share/doc/mimedefang/README.SPAMASSASSIN
/usr/share/doc/mimedefang/README.VEXIRA
/usr/share/doc/mimedefang/fang.pl
/usr/share/doc/mimedefang/linuxorg
/usr/share/doc/mimedefang/linuxorg/README
/usr/share/doc/mimedefang/linuxorg/filter
/usr/share/doc/mimedefang/linuxorg/spam-deliver
/usr/share/doc/mimedefang/linuxorg/spam-trusted-hosts
/usr/share/doc/mimedefang/stream-by-domain-filter
/usr/share/doc/mimedefang/suggested-minimum-filter-for-windows-clients
/usr/share/doc/mimedefang/word-to-html
/usr/share/licenses/mimedefang
/usr/share/licenses/mimedefang/COPYING
/usr/share/man/man1/mimedefang-util.1.gz
/usr/share/man/man5/mimedefang-filter.5.gz
/usr/share/man/man7/mimedefang-notify.7.gz
/usr/share/man/man7/mimedefang-protocol.7.gz
/usr/share/man/man8/md-mx-ctrl.8.gz
/usr/share/man/man8/mimedefang-multiplexor.8.gz
/usr/share/man/man8/mimedefang.8.gz
/usr/share/man/man8/mimedefang.pl.8.gz
/usr/share/man/man8/watch-mimedefang.8.gz
/usr/share/man/man8/watch-multiple-mimedefangs.8.gz
/var/log/mimedefang
/var/spool/MD-Quarantine
/var/spool/MIMEDefang

References

Summary

In this tutorial we learn how to install mimedefang on CentOS 8 using yum and dnf.