Mail Agents

MUA Mail User Agent –
Create new emails, and Read email. Ex.: Thunderbird,Evolution,Outlook,etc..

MTA Mail Transfer Agent –
Distribute the emails to other MTAs or Locally. Examples: Postfix

MDA Mail Delivery Agent or LDA Local Delivery Agent
Handles the final delivery, Store the emails in: text files,DB,etc.
Exemples: Procmail, Maildrop (needs account information to deliver)

[SOURCE] MUA -smtp-> MTA -smtp-> MTA –> MDA –> (storage) –> POP/IMAP –imap/pop-> MUA [TARGET]


When MTA recieves an email it consider two things:

  • The target email (mail to), if its local it accepts it
  • The host who is making the request, if not local MTA will decide who it is, only selected hosts can use MTA as relay.

When using MUA, it will need to use a relay:

[SOURCE] MUA -smtp-> MTA -smtp-> MTA [TARGET]


It is a MTA, does not manage POP3 or IMAP, would have to configure separate. Has its own logging.


  • Secure and efficiency, the author is Wietse Venema a security expert
  • Its a group of process instead of a one program like sendmail. Each process uses lowest security access
  • Its compatible with sendmail
  • Easy to setup. Very few configuration files, simple alias table

Minimal Configuration(for one domain):

  1. Correct hostname
  2. accept email from the
  3. add to the username, like
  4. deliver root email to another user
  5. configure some alias
  6. allow relaying for hosts in our LAN


myhostname =

mydomain =

mydestination = $mydomain

myorigin = $mydomain

mynetworks_style = class | subnet | host

mynetworks =,, 10.0.0/30

/etc/postfix/aliases , create links of email address to user accounts, as well as ditribution list

root: admin fubar

Postfix overview

Postfix is a email router, accept emails and decide what application will delivery to closest neighbor

The routing tables are “mapping”, used to know where to send, also what restrictions to relay clients, targets or check owner of messages.

Postfix Damons:



Configuration of Postfix

/etc/postfix – config files, most importants: and

/usr/lib/postfix – Binary of each daemon

/var/spool/postfix – Queue directory

/usr/sbin – Administration commands

/etc/init.d/postfix – Start/Stop/Reload/Restart

Other config. files:

alias_maps = hash:/etc/aliases

Many BD types can be used: hash,btree – ldap – mysql – nis, nisplus – regex

alias (5 types) :

postmaster: root – one to one, email to user map

sales: user1,user2,user3 – distribution list

marketing: :include:/etc/postfix/mailist – large distribution lists, defined inside the file

registry: /var/spool/mail/registry – file where to add email

help: “|/usr/local/bin/” – email is stdin to the script

Postfix Utilities:


postalias [type:]file -alias contrsuction

postcat -q qid -qid is the ID in the queue use mailq first

postmap [type:]file -maps contruction

command | postdrop -puts an email in the IN queue, or maildrop

postqueue [-p] [-f] -(-p) queue list, (-f) flush, tries to send all emails in the queue

postsuper [options] [dir] -(-d) delete a queue msg, (-h) puts msg in hold, (-H), unhold msg


Better View of Proccess:

The storage methods:




man postfix

Tags: , , , , , , , ,

2 thoughts on “Postfix Email System

  1. You have a mistake on the first line
    “MTA Mail User Agent –
    Create new emails, and Read email. Exemples: Thunderbird,Evolution,Outlook,etc..”
    Change “MTA” to read “MUA”
    also the spelling of “exemples”

Leave a Reply

Your email address will not be published. Required fields are marked *