Information About

Postfix (software)




  Developer Wietse Venema and many others
  Latest Release Version 2210
  Latest Release Date March 6 , 2006
  Latest Preview Version 23 Snapshot 20060403
  Latest Preview Date April 3 , 2006
  Operating System Cross-platform
  Genre Mail Transfer Agent
  License IBM Public License
  Website http://wwwpostfixorg/


Postfix is an Open Source Mail Transfer Agent (MTA), a Computer Program for the routing and delivery of Email . It is intended as a fast, easy-to-administer, and secure alternative to the widely-used Sendmail . Formerly known as '''VMailer''' and '''IBM Secure Mailer''', it was originally written by Wietse Venema during a stay at the IBM Thomas J. Watson Research Center , and continues to be actively developed today.

Postfix is the default MTA in a number of Linux Distribution s and the last two releases of Mac OS X (Panther & Tiger). It is released under The IBM Public Licence 1.0 , a GPL like Licence which has, however, been declared incompatible with the GPL.

Postfix can be compiled on: AIX , BSD , HP-UX , IRIX , Linux , MacOS X , Solaris , Tru64 UNIX and, generally speaking, on every unix-like OS that ships with a C compiler, standard POSIX development libraries and all the libraries required for handling BSD sockets.

Postfix was first released in the late '90s. The latest version 2.3 supports:
  • TLS ( Transport Layer Security ).

  • Greylisting and advanced content filtering.

  • different and PostgreSQL .

  • mailbox, maildir and virtual domains.

  • address handling, VERP, SASL autentication and much more.


One of the Postfix's points of strength is its resilience against Buffer Overflows . Another one being its handling of large amount of e-mails. Postfix is built as a cooperating network of different daemons. Each daemon carries on a single task using minimum privileges. In this way, if a daemon get compromised by an exploit or a bug the impact remains limited to that daemon and cannot spread along the entire system. There is only one process with root privileges, and few ones has rights to write on mass storage devices.


Structure


An image from the Postfix Home Page depicting its structure:

http://it.wikipedia.org/wiki/Immagine:Anatomy.png

Legenda:
  • Postfix is contained by the black box.

  • the yellow ellipsis are Postfix's processes/daemons.

  • yellow boxes are local mail destinations (mailboxes or maildirs) or mail queues both incoming or outgoing.

  • blue boxes are configuration files regarding each daemon.


Postfix receives e-mails from two different sources:
# local source (via the sendmail binary that places messages on Postfix's pickup)
# the network (both from localhost or remote hosts)

The SMTPD daemon listen on TCP port #25, and carries a conversation with the sender in order to receive it's messages.
SMTPD uses different authentication systems in order to allow or reject a message, i.e. RBL and an access list (based on IPs, domains and user+password couples).
Each message accepted by SMTPD is forwarded to "cleanup" daemon, then SMTPD stops.

CLEANUP receives the message an places it in the incoming mail queue. It handles FROM and TO (or RCPT) email fields in order to translate them, using '''virtual''' and '''canonical''' (this is done by the '''rewrite''' daemon).

VIRTUAL is derived from '''local''' , its task is to check from known e-mail addresses from a table and replace them with a local user name, in order to save the message into the user's maildir (e.g.: it replaces RCPT from "phil@example.com" to "phil"). This usually happens when an email is received from any remote host.

CANONICAL has the opposite task from Virtual, it replaces the FROM field making "phil@localhost" become "phil@example.com", so that address is suitable for any other host on the Internet.

The incoming queue act as a temporary storage zone useful while Postfix is accepting mails. Every time its content is changed the '''qmgr''' deamon is notified in order to handle it. Qmgr will take care of forwarding the email to the appropriate player. If any problem occours the email will be placed into the '''deferred''' location and handled again in future. Qmgr checks this queue at regular intervals.

Qmgr checks out the '''relocated''' table, which contains records like '''the user phil@example.com has been moved to phil.brown@example.com''', in order to deliver the message locally if it is possible.
Otherwise, if the destination address is valid and reachable:
# resolve, by accessing '''transport''', determines if the destination is local or not
# if the destination is local the e-mail is forwarded to local
# if the destination is on another server the message is sent to pipe or '''smtp'''

local is the daemon that finally writes the email in the user's mailbox (or maildir). It checks the '''alias''' table in order to find out the real end user name. The '''alias''' table in used to associate more addresses to an single user.
local also check the '''.forward''' file in order to eventually forward the message to another location if needed.

smtp, as opposite to '''smtpd''', carries on the task of connecting to a remote server on TCP port 25 and deliver the message.

UUCP is a legacy protocol that shares the same task of the SMTP protocol, it's used only for backward compatibility


Base configuration


There are some global configuration files, regarding the host (real or virtual) where Postfix is installed on.
One of them is "main.cf".
Usually this files comes shipped with the most part of the Linux distributions (and also BSD ) with a ready-to-use configuration.
Few parameters MUST be configured:

myhostname = FQDN
mydomain = your Domain_name
myorigin = the_string_that_have_to_be_placed_after_the_@_symbol
relayhost = if your host cannot send e-mails directly to any other server, insert here your ISP's SMTP server

Carefully read Postfix official documentation on Official website for any other customization


REFERENCES



EXTERNAL LINKS