Postfix is fast and popular SMTP server widely used. The main job of Postfix is to relay mail locally or to an intended destination outside the network. Some of the most popular SMTP servers are Sendmail, Postfix, and Qmail. This article will help you to install Postfix on Ubuntu 18.10, 18.04 LTS, 16.04 LTS, and 14.04 LTS systems.

Advertisement

For this tutorial, we are using the FQDN as mail.tecadmin.net for configuring this host.

Step 1 – Install Postfix

Postfix packages are available under default repositories of Ubuntu operating systems. Simply use the following command to install Postfix SMTP server on your Ubuntu system.

sudo apt-get install postfix

The installation process will ask you for some inputs like below. Just

Install Postfix on Ubuntu

Step 2 – Configure Postfix

Let’s start Postfix configuration. Edit Postfix configuration file /etc/postfix/main.cf in your favourite editor and make following changes. Change myhostname, mydomain as per your requirements.

  myhostname = host.tecadmin.net
  mydomain = tecadmin.net
  myorigin = $mydomain
  mydestination = $myhostname, localhost, $mydomain, localhost.localdomain
  mynetworks = 127.0.0.0/8, /32
  relay_domains = $mydestination
  inet_interfaces = all
  inet_protocols = all
  home_mailbox = Maildir/

Step 3 – Restart Postfix Service

As we have done basic Postfix configuration, So restart Postfix service to read changes of configuration. Also, configure to autostart on system boot.

sudo service postfix restart
Share.

3 Comments

Leave A Reply

Exit mobile version