How To Install tumgreyspf on Ubuntu 18.04

In this tutorial we learn how to install tumgreyspf on Ubuntu 18.04. tumgreyspf is external policy checker for the postfix mail server

Introduction

In this tutorial we learn how to install tumgreyspf on Ubuntu 18.04.

What is tumgreyspf

tumgreyspf is:

Tumgreyspf can optionally greylist and/or use spfquery to check SPF records to determine if email should be accepted by your server. The default behavior is to let emails comming from server that are SPF approved without any sort of greylisting, while all others will be greylisted.

SPF is information published by the domain owner about what systems may legitimately send e-mail for the domain. Greylisting takes advantage of spam and viruses that do not follow the RFCs and retry deliveries on temporary failure. These checks can be used as part of a mail system and allow several orders of magnitude reduction in spam, lower system load, and few problems with legitimate mail getting blocked.

Tumgreyspf uses the file-system as its database, no additional database is required to use it, see /var/lib/tumgreyspf/data and it’s clean-up cron script. Also take care that tumgreyspf will block emails from any domain with DNS configured with a buggy SPF record.

There are three methods to install tumgreyspf on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tumgreyspf Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tumgreyspf using apt-get by running the following command:

sudo apt-get -y install tumgreyspf

Install tumgreyspf Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tumgreyspf using apt by running the following command:

sudo apt -y install tumgreyspf

Install tumgreyspf Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tumgreyspf using aptitude by running the following command:

sudo aptitude -y install tumgreyspf

How To Uninstall tumgreyspf on Ubuntu 18.04

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

sudo apt-get remove tumgreyspf

Uninstall tumgreyspf And Its Dependencies

To uninstall tumgreyspf and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove tumgreyspf

Remove tumgreyspf Configurations and Data

To remove tumgreyspf configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge tumgreyspf

Remove tumgreyspf configuration, data, and all of its dependencies

We can use the following command to remove tumgreyspf configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tumgreyspf

References

Summary

In this tutorial we learn how to install tumgreyspf package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.