How To Install sa-exim on Debian 11

In this tutorial we learn how to install sa-exim on Debian 11. sa-exim is SpamAssassin filter for Exim

Introduction

In this tutorial we learn how to install sa-exim on Debian 11.

What is sa-exim

sa-exim is:

SA-Exim integrates SpamAssassin filtering at SMTP time with the Exim v4 MTA. It may be used to reject incoming mails before they arrive, or even to tie up the sender’s resources by slowing down the connection (“teergrubing”).

Most of the functionality of this package can also be achieved using the exiscan ACL conditions built into the “heavy” Exim daemon, exim-daemon-heavy. Use this package if you need SpamAssassin’s report_safe feature, or if you want to have easier control over the header fields added, without using the report template to add multiple fields.

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

Install sa-exim Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install sa-exim

Install sa-exim Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install sa-exim

Install sa-exim 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 sa-exim using aptitude by running the following command:

sudo aptitude -y install sa-exim

How To Uninstall sa-exim on Debian 11

To uninstall only the sa-exim package we can use the following command:

sudo apt-get remove sa-exim

Uninstall sa-exim And Its Dependencies

To uninstall sa-exim and its dependencies that are no longer needed by Debian 11, we can use the command below:

sudo apt-get -y autoremove sa-exim

Remove sa-exim Configurations and Data

To remove sa-exim configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge sa-exim

Remove sa-exim configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge sa-exim

Dependencies

sa-exim have the following dependencies:

References

Summary

In this tutorial we learn how to install sa-exim package on Debian 11 using different package management tools: apt, apt-get and aptitude.