Installing Postfix Mail Server

Installing Postfix Mail Server

This post is part of the series ‘Setting up Ubuntu Server and make it secure’.

Postfix is a mail server which can be used to receive and send mails through your Ubuntu Server installation.

The following steps assume, that you mainly use the server to send emails and you receive emails through another server, example GMail.

Step-by-step

  1. To install postfix, execute the following: sudo apt-get install postfix libsasl2-modules bsd-mailx
  2. Then there opens a interactive graphical mode, where you can setup Postfix. Simply follow the following steps for the most common setup
  3. Choose Internet Site
  4. Enter the FQDN of your server. This should be somthing like server.example.com
  5. If your server should only send mail, but not receiving any, edit the following line in /etc/postfix/main.cf
    inet_interfaces = all and change it to inet_interfaces = loopback-only and restart postfix with sudo service postfix restart
  6. You can add a ~/.forward file in the root’s and your’s home directory to automatically forward all mails to your real mail address. The only content of the file should be your mail address.

One thought on “Installing Postfix Mail Server

  1. Pingback: Setting up an Ubuntu Server | Stefan Profanter -- KB Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s