How To Install mail-stack-delivery on Ubuntu 18.04

In this tutorial we learn how to install mail-stack-delivery on Ubuntu 18.04. mail-stack-delivery is mail server delivery agent stack provided by Ubuntu server team

Introduction

In this tutorial we learn how to install mail-stack-delivery on Ubuntu 18.04.

What is mail-stack-delivery

mail-stack-delivery is:

Ubuntu’s mail stack provides fully operational delivery with safe defaults and additional options. Out of the box it supports IMAP, POP3 and SMTP services with SASL authentication and Maildir as default storage engine.

This package contains configuration files for dovecot.

This package modifies postfix’s configuration to integrate with dovecot

There are three methods to install mail-stack-delivery 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 mail-stack-delivery Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install mail-stack-delivery

Install mail-stack-delivery Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install mail-stack-delivery using apt by running the following command:

sudo apt -y install mail-stack-delivery

Install mail-stack-delivery 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 mail-stack-delivery using aptitude by running the following command:

sudo aptitude -y install mail-stack-delivery

How To Uninstall mail-stack-delivery on Ubuntu 18.04

To uninstall only the mail-stack-delivery package we can use the following command:

sudo apt-get remove mail-stack-delivery

Uninstall mail-stack-delivery And Its Dependencies

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

sudo apt-get -y autoremove mail-stack-delivery

Remove mail-stack-delivery Configurations and Data

To remove mail-stack-delivery configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge mail-stack-delivery

Remove mail-stack-delivery configuration, data, and all of its dependencies

We can use the following command to remove mail-stack-delivery configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge mail-stack-delivery

References

Summary

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