How To Install sqlgrey on Fedora 34

sqlgrey is Postfix grey-listing policy service

Introduction

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

What is sqlgrey

SQLgrey is a Postfix grey-listing policy service with auto-white-listing written in Perl with SQL database as storage backend. Greylisting stops 50 to 90% of junk mails (spam and virus) before they reach your Postfix server (saves BW, user time and CPU time).

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

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

sudo dnf -y install sqlgrey

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

sudo yum -y install sqlgrey

How To Uninstall sqlgrey on Fedora 34

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

sudo dnf remove sqlgrey

sqlgrey Package Contents on Fedora 34

/etc/sqlgrey
/etc/sqlgrey/README
/etc/sqlgrey/clients_fqdn_whitelist
/etc/sqlgrey/clients_ip_whitelist
/etc/sqlgrey/discrimination.regexp
/etc/sqlgrey/dyn_fqdn.regexp
/etc/sqlgrey/smtp_server.regexp
/etc/sqlgrey/sqlgrey.conf
/usr/bin/sqlgrey-logstats.pl
/usr/lib/systemd/system/sqlgrey.service
/usr/sbin/sqlgrey
/usr/sbin/update_sqlgrey_config
/usr/share/doc/sqlgrey
/usr/share/doc/sqlgrey/CONTRIB
/usr/share/doc/sqlgrey/COPYING
/usr/share/doc/sqlgrey/Changelog
/usr/share/doc/sqlgrey/FAQ
/usr/share/doc/sqlgrey/HOWTO
/usr/share/doc/sqlgrey/README
/usr/share/doc/sqlgrey/README.DBCLUSTER
/usr/share/doc/sqlgrey/README.DISCRIMINATION
/usr/share/doc/sqlgrey/README.OPTINOUT
/usr/share/doc/sqlgrey/README.PERF
/usr/share/doc/sqlgrey/TODO
/usr/share/man/man1/sqlgrey.1.gz
/var/lib/sqlgrey
/var/lib/sqlgrey/sqlgrey.db

References

Summary

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