If you have not chosen to configure your installation using our quick-start script, you need to install various software packages first.
Below, we have listed the required software packages for the various tested distributions and versions
For supported Ubuntu versions 18.04
and 20.04
, we required the following software packages installed:
You can replace nginx
with whatever webserver that you want. The important thing is that it supports WSGI
and preferably ASGI
or both.
Next we need to install the PostgreSQL database server. The purpose of the postgresql-common
package is to provide us with a script that configures the PostgreSQL repository for us.
Run the script like this:
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
If running as root
, you can ommit sudo
from the above command
Once configured, install the following packages:
If the target server is not supposed to run the database server, ommit the postgresql-12
package
To compile frontend of the application, you also need to install NodeJS
You can install it from the official Ubuntu repository and risk getting a version that is not fully compatible with MailGuardian
. To make it easy, we recommend installing the LTS version tested with MailGuardian
, using this command:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Finally install the package nodejs
and that is it.
For supported Ubuntu versions 10
and 11
, we required the following software packages installed:
You can replace nginx
with whatever webserver that you want. The important thing is that it supports WSGI
and preferably ASGI
or both.
On Debian, some required packages are only available through the backports
repostory, so we need to install it like this
echo "deb http://deb.debian.org/debian $(lsb_release -cs)-backports main" > /etc/apt/sources.list.d/debian-backports.list
The above command has to be run as root
Next we need to install the PostgreSQL database server. The purpose of the postgresql-common
package is to provide us with a script that configures the PostgreSQL repository for us.
Run the script like this:
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
If running as root
, you can ommit sudo
from the above command
Once configured, install the following packages:
If the target server is not supposed to run the database server, ommit the postgresql-12
package
To compile frontend of the application, you also need to install NodeJS
You can install it from the official Ubuntu repository and risk getting a version that is not fully compatible with MailGuardian
. To make it easy, we recommend installing the LTS version tested with MailGuardian
, using this command:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Finally install the package nodejs
and that is it.
We support various RHEL-based distributions in both version 7
and version 8
.
We do also support RedHat Enterprise Linux (RHEL), but some components are installed differently, so it will have its own section.
The instructions are quite similar, but there are a few differences, as version 7
does not have a version of Postfix 3, that supports PostgreSQL.
The vert first thing to do is to install the EPEL repository like this:
sudo yum install epel-release -y
First we need to get a version of postfix version 3, which supports PostgreSQL. There are a few ways to get it done and if you really want to, you can compile it from the sources.
The easiest is however to install from a repository, where someone has created a prebuilt package for it. There are many repositories that might have this, but in our quick start script, we have opted to use GhettoForge
.
You can install it like this:
sudo yum --nogpg install https://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm -y
sudo yum clean all
sudo yum makecache fast
Next remove any existing installation of postfix from the system:
sudo yum remove postfix -y
Next, we install PostgreSQL as our database server repository:
sudo yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
Next install postfix 3:
sudo yum install --enablerepo=gf-plus postfix3 postfix3-pgsql -y
Next we need to install various packages for compiling required libraries from sourcecode. Again there are multiple ways of doing it, but the easiest is to install the Development Tools
package group like this:
sudo yum groupinstall "Development Tools" -y
First is to add the PostgreSQL database server repository:
sudo dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
Next we need to disable the builtin PostgreSQL packages, so that we do not create a conflict
sudo dnf -qy module disable postgresql
Next we need to ensure that we have postfix with support for PostgreSQL, by installing the following packages:
Once we have taken care of required software that has to install differently for the two versions, we can now continue with the common stuff.
Install the following packages:
Next step is to install the database server Install the following packages:
Ommit postgresql12-server
if the target is not supposed to run the database server.
RHEL-based distributions do not preconfigure PostgreSQL for us, so we have to that now
sudo /usr/pgsql-12/bin/postgresql-12-setup initdb
To compile frontend of the application, you also need to install NodeJS
You can install it from the official Ubuntu repository and risk getting a version that is not fully compatible with MailGuardian
. To make it easy, we recommend installing the LTS version tested with MailGuardian
, using this command:
curl -sL https://rpm.nodesource.com/setup_14.x | sudo bash -
Finally install the package nodejs
and that is it.