How To Install amavisd-new-postfix on Ubuntu 18.04

In this tutorial we learn how to install amavisd-new-postfix on Ubuntu 18.04. amavisd-new-postfix is part of Ubuntu mail stack provided by Ubuntu server team

Introduction

In this tutorial we learn how to install amavisd-new-postfix on Ubuntu 18.04.

What is amavisd-new-postfix

amavisd-new-postfix is:

AMaViSd-new is a script that interfaces a mail transport agent (MTA) with zero or more virus scanners, and spamassassin (optional).

It supports all common virus scanners (more than 20 different AVs), with direct talk-to-daemon support for ClamAV, OpenAntiVirus, Trophie, AVG, f-prot, and Sophos AVs.

AMaViSd-new supports all MTAs through its generic SMTP/LMTP filter mode (ideal for postfix and exim). It is faster and safer to use the SMTP/LMTP filter mode than using the AMaViS pipe client. It supports sendmail milter through this package.

This package contains configuration files for amavis and alters postfix configuration to utilize amavisd-new.

There are three methods to install amavisd-new-postfix 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 amavisd-new-postfix Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install amavisd-new-postfix

Install amavisd-new-postfix Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install amavisd-new-postfix using apt by running the following command:

sudo apt -y install amavisd-new-postfix

Install amavisd-new-postfix 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 amavisd-new-postfix using aptitude by running the following command:

sudo aptitude -y install amavisd-new-postfix

How To Uninstall amavisd-new-postfix on Ubuntu 18.04

To uninstall only the amavisd-new-postfix package we can use the following command:

sudo apt-get remove amavisd-new-postfix

Uninstall amavisd-new-postfix And Its Dependencies

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

sudo apt-get -y autoremove amavisd-new-postfix

Remove amavisd-new-postfix Configurations and Data

To remove amavisd-new-postfix configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge amavisd-new-postfix

Remove amavisd-new-postfix configuration, data, and all of its dependencies

We can use the following command to remove amavisd-new-postfix configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge amavisd-new-postfix

References

Summary

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