How To Install clamsmtp on Fedora 34

clamsmtp is A SMTP virus scanning system

Introduction

In this tutorial we learn how to install clamsmtp on Fedora 34.

What is clamsmtp

ClamSMTP is an SMTP filter that allows you to check for viruses using the ClamAV anti-virus software. It accepts SMTP connections and forwards the SMTP commands and responses to another SMTP server. The ‘DATA’ email body is intercepted and scanned before forwarding. It aims to be lightweight, reliable, and simple rather than have a myriad of options. It’s written in C without major dependencies. If you need more options then you could use something big like AMaViS which is written in PERL and can do almost anything. Written with the Postfix mail server in mind it can be configured as a Postfix Content Filter. It can also be used as a transparent proxy to filter an entire network’s SMTP traffic at the router.

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

Install clamsmtp on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install clamsmtp

Install clamsmtp on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install clamsmtp

How To Uninstall clamsmtp on Fedora 34

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

sudo dnf remove clamsmtp

clamsmtp Package Contents on Fedora 34

/etc/clamd.d/clamsmtp.conf
/etc/clamsmtpd.conf
/etc/logrotate.d/clamsmtp
/usr/lib/.build-id
/usr/lib/.build-id/b2
/usr/lib/.build-id/b2/58dfc543d0d3350cac9ecbdbe63164a035ec73
/usr/lib/systemd/system/clamsmtp-clamd.service
/usr/lib/systemd/system/clamsmtpd.service
/usr/lib/tmpfiles.d/clamsmtp.conf
/usr/sbin/clamsmtpd
/usr/share/doc/clamsmtp
/usr/share/doc/clamsmtp/AUTHORS
/usr/share/doc/clamsmtp/README
/usr/share/licenses/clamsmtp
/usr/share/licenses/clamsmtp/COPYING
/usr/share/man/man5/clamsmtpd.conf.5.gz
/usr/share/man/man8/clamsmtpd.8.gz
/var/lib/clamd.clamsmtp
/var/log/clamd.clamsmtp
/var/run/clamd.clamsmtp
/var/run/clamsmtpd

References

Summary

In this tutorial we learn how to install clamsmtp on Fedora 34 using yum and dnf.