Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Mail Servers»Postfix»How To Install Postfix on Ubuntu 18.04 & 16.04 LTS

    How To Install Postfix on Ubuntu 18.04 & 16.04 LTS

    By RahulFebruary 18, 20192 Mins Read

    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

    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
    

    mail Postfix smtp
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Postfix: Sending Emails From External SMTP Servers

    Postfix: Sending Emails From External SMTP Servers

    Postfix: Configure SASL Authentication for Remote SMTP

    Postfix: Configure SASL Authentication for Remote SMTP

    Postfix: Relay Email from SMTP based on From Address

    Postfix: Relay Outgoing Emails Based On Sender Address

    View 3 Comments

    3 Comments

    1. chandru on December 21, 2020 3:06 pm

      Hi can you please share the steps of prerequisites for this process (how to add FQDN)

      Reply
    2. Noe on December 2, 2020 5:59 pm

      Cant I use Squirrelmail as a web client. Or what other web client for email do you recomend.
      Thanks in advance.

      Reply
    3. janus on December 6, 2015 1:28 pm

      hi i get an error on the command chkconfig:

      “chkconfig command not found”

      Ubuntu 15.04

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.