Installing PostFix on Ubuntu 20.04 a CreatingNet.Works How To
A mail server is very useful when you own a website or web application and want to send transactional emails to users.
There are many Amazing Options to choose from when considering a mail server.
This post is going to cover just one of them: Postfix.
Postfix is a free and open-source Mail Transfer Agent used to send and receive emails. Postfix is free to use thus saving you from needing a 3rd party pay-to-use provider .
You will need a server running Ubuntu 20.04 as the operating system with at least 2GB RAM.
STEP 1
Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages.
# Apt-get update -y && apt-get upgrade -y
STEP 2
you will need to set the hostname of your server:
# hostnamectl set-hostname your.hostnamegoeshere.com
Next, edit /etc/hosts file and add the following line:
领英推荐
nano /etc/hosts
Add the following line:
your-server-ip your.hostnamegoeshere.com
Save and close the file when you are finished.
STEP 3 - Install Postfix & Verify
The simple and easiest way to install Postfix is to install mailutils package to your system.
You can install the mailutils package using the following command:
apt-get install mailutils -y
During the installation, you will be asked to select the type of mail configuration, Select Internet Site and hit?Enter. You will be asked to provide your mail name - enter your domain name and/or your hostname.
Next, check the status of Postfix using the following command:
systemctl status postfix
There is a bit more setup - depending upon your needs.
Next in the series we will go over how to configure various options - but for now you have a running mail server.