25.02.2013 Views

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

TCP/IP Tutorial and Technical Overview - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 15-4 provides a diagram of how these components interact.<br />

MUA<br />

Host 1<br />

Host 2<br />

MUA<br />

Figure 15-4 The typical mail model<br />

Within this model, sendmail plays the role of the MTA. While most current<br />

implementations of sendmail now employ SMTP (see 15.1, “Simple Mail Transfer<br />

Protocol” on page 556), the application has the flexibility to use any mail<br />

protocol—st<strong>and</strong>ard or proprietary.<br />

15.2.2 How sendmail works<br />

MTA<br />

MDA<br />

MTA<br />

MDA<br />

Sendmail uses a queuing system to manage inbound <strong>and</strong> outbound mail.<br />

Running as a daemon, sendmail listens on well-known port 25 for inbound<br />

messages. Upon receiving a message, sendmail spawns a process to queue the<br />

message up in a queue file. Though the location of this file is implementation<br />

specific, it usually exists as /var/spool/mqueue.<br />

If the message can be delivered immediately, the spawned process does so,<br />

de-queues the message, <strong>and</strong> then terminates. If the message cannot be<br />

delivered, the process leaves the message on the queue, but still terminates. At<br />

regular intervals, the sendmail parent process spawns a new process to check<br />

Chapter 15. Mail applications 569

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!