w3resource
Linux Tutorial

Email services: Postfix

Email services: Postfix

Postfix is the default Mail Transfer Agent (MTA) for Ubuntu

screen shot insert

Rich set of features:

  • Protocols:
    • SMTP
    • DKIM
    • DSN status
    • ETRN
    • IPv6
    • SASL authentication
    • TLS encryption/authentication
    • QMQP
    • Junk mail control
  • Databases:
    • Berkley
    • CDB
    • LDAP
    • MySQL
    • PostgreSQL
  • Mailbox and Maildir formats
  • Virtual domains
  • Address masquerading
  • Selective address rewriting
  • VERP envelope return
  • address

Postfix installation

Installing Postfix:

sudo apt-get install postfix

postfix.PNG
email-install-postfix

The configuration screens will come up as part of the installation.

To reconfigure at a later time:

sudo dpkg-reconfigure postfix
postfix-reconfigure1
postfix-reconfigure2
postfix-reconfigure3
postfix-reconfigure4
postfix-reconfigure5
postfix-reconfigure6
postfix-reconfigure8
postfix-reconfigure9
postfix-reconfigure10
postfix-reconfigure11

postfix-reconfigure12

postfix-reconfigure13

postfix-reconfigure14

postfix-reconfigure15
postfix-reconfigure15

Or, you can edit the Postfix configuration file /etc/ postfix/main.cf. After editing, restart:

Install it:

sudo apt-get install postfix
email-install-postfix

Postfix configuration

    Sample values:
  • Internet Site
  • mail.example.com
  • peter
  • mail.example.com,
    localhost.localdomain, localhost
  • No
  • 127.0.0.0/8 [::ffff:127.0.0.0]/104 [:: 1]/128 192.168.0/24
  • 0
  • +
  • all

Check sources such as these for details on configuration:

  • http://flurdy.com/docs/postfix/
  • http://ubuntuforums.org/ showthread.php?t=780509
  • http://en.wikipedia.org/wiki/ Email#Workings

SMTP authentication

Allows a client to identify itself. Once authenticated, the SMTP server will allow the client to relay mail.

Configuration for SMTP-AUTH is done with the Dovecot package:

Install it:

sudo apt-get install dovecot-postfix

email-devocot-postfix

In production, you will need to configure the SSL
certificate and key to be used with authentication and
encryption.

sudo apt-get install dovecot-postfix

Test by sending yourself an email

Install nail, a command line emailer:

sudo apt-get install nail

Previous: NFS
Next: Firewall