How To Install Postfix on Ubuntu 18.04?

Postfix is an open-source Mail Transfer Agent (MTA). It uses to route and deliver emails on a Linux machine. Please refer to the following steps to install and configure Postfix on Ubuntu 18.04.

Before proceeding for the steps, you need to ensure that you are using FQDN (Fully Qualified Domain Name) as your Ubuntu 18.04 server's hostname. Also, the MX record needs to point to your email server if you want to receive the emails in Postfix.

  1. It is easy to install Postfix because it is included in the default repositories of Postfix. At first, we will update the apt package and run the below command. 

    sudo apt update 
    sudo apt-get install postfix
  2. At the installation setup, select the Internet Site for the mail configuration and enter the domain name for your email server. 

  3. Enter the root and postmaster email addresses. This email address uses for the primary account.

  4. Other destinations to accept mail for. In this, we can mention other domains. Postfix can receive emails for the mentioned domain. You can enter your other domains. If you don't want to enter any domain, you can keep the default value and hit the OK button. 

  5. We will set No in the below option as we use the journaled filesystem.

  6. At the Local Network, keep the default settings and hit the OK button. 
  7. Enter the Mail Box size limit. If you set the 0, it means there is no restriction on the mailbox size limit.

  8. Choose the character for the local address extension, if require and click on the OK button.

  9. Select all the internet protocols. Once you click on it, the installation process will begin to start. 

  10. After completing the process, check for the service, and it should be Active.

    service postfix status
  11. Now, let us test the Postfix server using telnet.

    telnet 127.0.0.1 25
    Connected to 127.0.0.1.
    Escape character is '^]'.
    220 demovpstest.com ESMTP Postfix (Ubuntu)

Related Articles

How to Install and configure Dovecot on CentOS?

Dovecot is used to receive incoming emails on your server from Postfix. Dovecot is an open-source...

How to create users and groups in CentOS7?

Once the Linux system is configured, adding and removing users is one of the most basic tasks...

Virtual Machine with CentOS 5 32-Bit OS Does not Address Physical Memory More Than 3 GB

Recently we came across very strange issue wherein Linux virtual machine with Centos 5.X 32 Bit...

How to run ClamAV and Maldet together on cPanel server?

You may be familiar with ClamAV and Maldet scanner (aka Linux Malware Detect). They're widely...

how to configure SSH key-based Authentication in Linux VPS or Dedicated Server

This article will guide how to configure SSH key-based Authentication in Linux VPS or Dedicated...

  • 0 Users Found This Useful

Was this answer helpful?