next up previous
Next: Preparation Up: Mail Handling Previous: Go Away!

Subsections

Theory

Outgoing Mail

Figure 15: Mail Handling -- Outgoing Mail
\includegraphics[width=\textwidth, height=\graphicsheight, keepaspectratio=true]{outgoing.eps}

The basic arrangement for outgoing mail is quite simple and shown in figure 15. Sendmail is designed to decide how mail should be handled, based on the mail address and forward it to the appropriate destination. This is exactly what we wish to do here. Mail destined for the outside world should simply be forwarded to sendmail on your ISP's mail server. Mail destined for a local mailbox should be diverted into that mailbox.

If that were all there is to it, it should be possible to use the sendmail configuration that comes with Solaris out of the box. However, there are two, additional complications:

Sendmail is flexible enough to allow this sort of thing to be done. You just have to learn to navigate its weird configuration syntax.

Incoming Mail

Figure 16: Mail Handling -- Incoming Mail
\includegraphics[width=\textwidth, height=\graphicsheight, keepaspectratio=true]{incoming.eps}

Incoming mail appears in two stages, shown in figure 16. The first stage gets mail from your ISP's POP3 server and delivers it into your local mailboxes. This stage is shown by the blue arrows in figure 16. The second stage is when one of your users wants to get their mail. This mail is sent via your local POP3 server. The red arrows show this path.

A program called fetchmail gets mail for your system. Fetchmail logs into the POP3 server on your ISP and checks to see whether there is any mail available. If there is mail available, then fetchmail delivers the mail locally. Fetchmail uses sendmail to deliver the received messages, this allows you to handle any aliases or other forwarding neatly. Fetchmail can be configured to check multiple mailboxes on the ISP side. Fetchmail can also be configured to divide the mail delivered to a single ISP mailbox into multiple local mailboxes, based on the To: line.

Once the mail has been delivered into your local mailboxes, any POP3 clients you have locally need to connect to a local POP3 server. This server then gets the mail from the local mailbox and delivers it to the client.

More Information

As always, O'Reilly have a guide to sendmail.[2] This is a very thick book, especially when you consider the terseness of most O'Reilly books.

The RFCs which make up SMTP are RFC 821, RFC 1869 and RFC 1870.[19,3,7]. Together, they make up STD-10.[21]

The RFCs which make up POP3 are RFC 1939, with some additional information in RFC 1957.[14,15] RFC 1939 forms STD-53.[22]


next up previous
Next: Preparation Up: Mail Handling Previous: Go Away!
Doug Palmer 2003-02-15