Jump to content

Training doc new

From TetraWiki

Auto-generated from the uploaded PDF Training_doc_new.pdf. This is an extracted-text rendering for searchability; see the original PDF for exact formatting, diagrams, tables, and images.


TETRA TRAINING DOC

.
What Is Mail Server?
A server that stores incoming mail and sends it to the correct user, and
stores outgoing mail and transfers it to the correct destination server on
the Internet.


Mail server components, descriptions, and examples

    Component                   Description                              Examples

    Mail User Agent (MUA)       An application with which users can
                                                                         Microsoft Outlook Express
                                create, view, send, and receive email.
                                                                         Mozilla Thunderbird
                                The MUA is located on a client
                                system, such as a workstation or PC.     Mutt E-Mail Client

    Mail Transfer Agent (MTA)   An application that sends, receives,
                                                                         Postfix
                                and stores email. This program
                                                                         Sendmail
                                determines where and how to store
                                email.                                    Lotus Domino Server
                                                                          Microsoft Exchange
                                                                         The Postfix, Dovecot, and
    Mail Delivery Agent (MDA)   An application that saves received       Cyrus
                                                                         applications each implement
                                email to the MSA. This program           some or
                                                                         all of the functions of the
                                might also perform additional tasks      MDA.
                                such as filtering email or delivering
                                email to subfolders.

    Mail Storage Area (MSA)     A local system or server where the
                                                                         Mbox
                                MTA stores email. This is also the
                                                                         Maildir
                                location from which the MSS
                                retrieves email at the request of the    /var/mail/spool/username/
                                MUA.

    Mail Storage Server (MSS)   An application that retrieves email
                                                                         Dovecot
                                from the MSA and returns it to the       Cyrus
                                MUA.

Email flows through the mail server components as follows:
1. From their MUA, the sender creates an email and clicks Send.
2. The MUA uses SMTP to send the email to an MTA.
3. The MTA relays and routes the email to an MTA in the domain of the recipient.
4. The MTA in the domain of the recipient sends the email to an MDA of the system of the
recipient.
5. The MDA stores the email in an MSA.
6. The MUA of the recipient queries an MSS.
7. The MSS uses IMAPv4 or POP to retrieve the email for the recipient from the MSA.
    8. The MSS returns the email to the MUA.
    9. From their MUA, the recipient reads the email created by the sender.

In conjunction with mail server applications and email clients, you can use additional applications
to
pre-process and post-process email. For example, you can use filtering applications, anti-virus
software,
or anti-spam applications.


Composition Of mail server -

Migration From Proprietary Server To Open Source Server :

ARCHITECTURE:


 1. This is single level architecture where one server have all required services
    like pop, imap, smtp, ldap
 2. Mx directly pointed to this server.
 3. Through this server all user can see or download there mail.
 4. This archtecture followed by
    a. heromotocorp.biz
    b. sahara prime city

2 . ARCHITECTURE


  1. In this type of Architecture one fetchmail are present through which we fetch
     the mail from other server or we puch the mail from one server to another
     server.
  2. Primarily if some user send mail then mail first land to fetchmail server if it's
     line is conjected then mail redirect to second mail server that giver in above
     figure.
  3. Some organization working on this architecture
     a. krishna grp
     b. jbindia
  4. krishna maruti
  5. satyam cineplex


ARCHITECTURE 3: Single domain/Multiple Server

   1. In this architecture when some one send you the mail then it land to the as/av
      after checking spam and viruses it send to main server
   2. second thing is that all server inter linked with each other through which they
      communicate with each other or passes mail to exact location , these link can
      be vpn or leased line depending on customer end.
   3. These type of structure followed by vardhman client


Architecture 4:

1. In this of architecture when some one send mail from outer side it land first to
   one of the server of qmail containing MX which is located anywhere in the
   world if we talk about heromotocorp.com it server exist in US . And it check
   spamingg and viruses .
2. This server send it to another qmail servers. We use 2 server for safety purpose
   because if one of them have more load it send it to second qmail server.
3. After that qmail server send mail to AS/AV for checking spam and viruse again
4. After this is forwarded to local users through lotus software

Architecture 5 :


   1. In this type of structure when some one send mail to our domain it direclty
      land to server which contain AS/AV it that server is busy it send to another
      server as shown in figure.
   2. After checking spam and virus it send to mail server if main server are busy
      then it send to another one .
   3. They all are interconnected so it can communicte very easily.

Architecture of Qmail:

qmail- qmail is an Internet Mail Transfer Agent (MTA) for UNIX-like operating
systems. It's a drop-in
replacement for the Sendmail system provided with UNIX operating systems. qmail
uses the Simple
Mail Transfer Protocol (SMTP) to exchange messages with MTA's on other systems.


qmail Basic Structure-


The queue resides on disk
         • It is a repository for all messages that have not yet been delivered
   • qmail-queue puts a new message in the queue and pulls a trigger
   • This wakes up qmail-send, the primary component
   • qmail-send examines the message for addresses
   • For remote deliveries, it invokes qmail-rspawn, which runs qmail-
     remote
   • For local deliveries, it invokes qmail-lspawn, which runs qmail-local
   • When a message is fully delivered, it invokes qmail-clean to remove it
     from the queue


Fig. Above figure is The Big Picture Of qmail


               Components of qmail-ldap

qmail-queue
qmail-queue takes messages and places them in the queue. It always adds a "received"-line and
does no further message inspection.

qmail-send
qmail-send handles messages placed in the outgoing queue by qmail-queue and uses qmail-lspawn
for local deliveries and qmail-rspawn for remote deliveries. qmail-send will reschedule all
messages in the queue for immediate delivery.

qmail-todo
qmail-todo does the mail preprocessing to reduce the work load in qmail-send. With qmail-todo the
overall performance on high throughput mail servers is far better because of the so called "silly
qmail syndrom" caused by a over loaded qmail-send process.

qmail-lspawn
qmail-lspawn looks up the user for a mail to be delivered locally and invokes qmail-local to
perform it.

qmail-local
qmail-local performs the delivery. It also handles the .qmail-files.

qmail-rspawn
qmail-rspawn invokes qmail-remote for remote deliveries.

qmail-remote
qmail-remote sends a mail to a remote host via SMTP.

qmail-inject
qmail-inject reads a message from its stadard input, adds headers and invokes qmail-queue to
handle the delivery.

 qmail-smtpd
qmail-smtpd normally listens on port 25/tcp and receives messages from remote hosts via SMTP.

qmail-qmqpd
qmail-qmqpd receives messages from remote hosts via QMQP, the Quick Message Queuing
Protocol. It will relay _every_ message, so you must make sure only preauthorized hosts can
connect. QMQP is used for in-cluster deliveries, if you want to use qmail-ldap's clusteriung you
must set up qmail-qmqpd.

qmail-popup
qmail-popup reads username and password for POP3 from the network and invokes a subprogram
(usually auth_pop) for authentification.

qmail-pop3d
qmail-pop3d is invoked from qmail-popup and handles the POP3-session.

auth_pop
Is normally invoked from qmail-popup to authentificate the user. It is also responsible for pop3-
session forwarding inside a qmail-ldap cluster.

auth_imap
As auth_pop, but for IMAP. Handles also session forwarding.

qmail-ldaplookup
Is a tool to check if your ldap setup is correct. Use qmail-ldaplookup -u [uid] or qmail-ldaplookup
-m [mail address].