• Home
  • Ubuntu 16.04
    • Whats New ?
    • Install JAVA 8
    • Setup LAMP Stack
    • Install LEMP Stack
    • Install Node.js
    • Install Git
    • Move Unity Launcher to Bottom
  • FeedBack
  • Funny Tools
  • Tutorials
    • Linux Distributions
      • CentOS
      • Debian
      • Fedora
      • LinuxMint
    • Monitoring Tools
      • Monit
      • Nagios
      • NRPE
    • Network Services
      • DHCP
      • DNS
      • FTP
    • Databases
      • MySQL
      • MariaDB
      • MongoDB
      • PostgreSQL
      • SQL Server
    • Amazon Web Services
  • Submit Article
  • About Us
TecAdmin.net
  • Home
  • Ubuntu 16.04
    • Whats New ?
    • Install JAVA 8
    • Setup LAMP Stack
    • Install LEMP Stack
    • Install Node.js
    • Install Git
    • Move Unity Launcher to Bottom
  • FeedBack
  • Funny Tools
  • Tutorials
    • Linux Distributions
      • CentOS
      • Debian
      • Fedora
      • LinuxMint
    • Monitoring Tools
      • Monit
      • Nagios
      • NRPE
    • Network Services
      • DHCP
      • DNS
      • FTP
    • Databases
      • MySQL
      • MariaDB
      • MongoDB
      • PostgreSQL
      • SQL Server
    • Amazon Web Services
  • Submit Article
  • About Us
23 April 2015

How To Install Postfix on Ubuntu 16.04 & 14.04 LTS

Written by Rahul K. | April 23, 2015
Postfix mail, Postfix, smtp

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 17.10, 16.04, 14.04 LTS and 12.04 LTS systems.

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

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 it!
Share on Facebook
Share on Twitter
Share on Google+
Share on Reddit
Share on Tumblr
Rahul K.
Rahul K.
Connect on Facebook Connect on Twitter Connect on Google+

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • How to Install Postal Mail Server on Ubuntu 16.04 & 14.04

  • How to Transfer Mailboxes Between IMAP Servers with Imapsync

  • How to Install and Use Imapsync on Ubuntu & Debian

  • How to Install and Use Imapsync on CentOS & Fedora

  • How to Setup Mail Forwarding in Postfix

1 Comment

  1. janus Reply to janus
    December 6, 2015 at 1:28 pm

    hi i get an error on the command chkconfig:

    “chkconfig command not found”

    Ubuntu 15.04

Leave a Reply

Cancel reply

Popular Posts

  • How to Install JAVA 8 on Ubuntu 16.04/14.04, LinuxMint 18/17
  • How to Install s3cmd in Linux and Manage Amazon s3 Buckets
  • How to Install AnyDesk on Ubuntu, Debian and LinuxMint (Alternative of TeamViewer)
  • How to Setup Selenium with ChromeDriver on Ubuntu 16.04
  • How to Install MySQL on macOS Sierra and High Sierra
All rights reserved. © 2013-2018 TecAdmin.net. This site uses cookies. By using this website you agree our term and services