How To Install milter-greylist on Debian 9

In this tutorial we learn how to install milter-greylist on Debian 9. milter-greylist is Greylist milter for sendmail

Introduction

In this tutorial we learn how to install milter-greylist on Debian 9.

What is milter-greylist

milter-greylist is:

milter-greylist is a stand-alone milter written in C that implements the greylist filtering method, as proposed by Evan Harris.

Greylisting works by assuming that unlike legitimate MTA, spam engines will not retry sending their junk mail on a temporary error. The filter will always temporarily reject mail on a first attempt, and to accept it after some time has elapsed.

If spammers ever try to resend rejected messages, we can assume they will not stay idle between the two sends (if they do, the spam problem would just be solved). Odds are good that the spammer will send a mail to an honey pot address and get blacklisted in several real-time distributed black list before the second attempt.

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

Install milter-greylist Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install milter-greylist

Install milter-greylist Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install milter-greylist

Install milter-greylist 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install milter-greylist

How To Uninstall milter-greylist on Debian 9

To uninstall only the milter-greylist package we can use the following command:

sudo apt-get remove milter-greylist

Uninstall milter-greylist And Its Dependencies

To uninstall milter-greylist and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove milter-greylist

Remove milter-greylist Configurations and Data

To remove milter-greylist configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge milter-greylist

Remove milter-greylist configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge milter-greylist

Dependencies

milter-greylist have the following dependencies:

References

Summary

In this tutorial we learn how to install milter-greylist package on Debian 9 using different package management tools: apt, apt-get and aptitude.