-->
Previous | Table of Contents | Next |
Configuring smail for TCP Use
If you are going to use a network connection to transfer mail, you need to make modifications to the /usr/lib/smail/config file that specify the types of connections and host names. There are several different methods of configuring mail systems for a network, including using NFS (Network File System) to allow a single configuration file that is shared by all machines, using POP (Post Office Protocol) or IMAP (Interactive Mail Access Protocol) to handle mail on a central site, and setting up each machine as an independent mail handler. The configuration process for all these methods is much the same, the difference being whether the configuration files reside on each machine in the network or on a single machine that is then accessed by NFS or SMTP by other machines.
Start the configuration process by establishing the local domain names using the variables visible_domain and visible_name. These were discussed in detail in the previous section on configuring smail for UUCP, so well limit the explanation to showing final examples of these two variables. An example of these variable definitions looks like this:
# Our domain name visible_domain=tpci.com # Our domain name for outgoing mail visible_name=tpci.com
This sets the local domain name and domain resolution names. The entry for visible_domain is used by smail to attach to all outgoing mail packages (instead of whatever name is generated by the hostname command). Both visible_domain and visible_name are often the same.
The next configuration step is to set the name of a smart host that handles out-of-network messages. If you are not using a smart host or your machine handles the network connections itself, you wont need to enter these values. The variables involved in setting up a smart host are smart_path and smart_transport. The smart_path sets the machine name of the smart host (which must be resolvable with the domain name given in visible_domain). The smart_transport specifies the type of protocol to be used to connect to the smart host. Since most smart hosts communicate (for mail purposes, at least) with SMTP, that is the most often used value, as shown in this extract from a /usr/lib/smail/config file:
# smart host routing # smart host name smart_host=merlin # communications protocol to smart host smart_transport=smtp
The smart_transport value of smtp (lowercase letters only) is used to identify the SMTP connection protocol.
The configuration files and processes previously mentioned apply to most Linux systems, and many systems require no further actions than those already covered. However, as mentioned earlier in this chapter, three components in smail (router, director, and transport) can each be further configured to modify their behavior. This can help you fine-tune or modify your smail installation to meet particular network needs. The only component we really need to examine in detail is the router because the director and transport seldom need customization for a typical Linux installation.
In most cases, the behavior of each smail component is handled by a file (or several files) based in the smail configuration directory (usually /usr/lib/smail). There are many sample configuration files available from Linux distribution CD-ROMs and FTP sites that show different configurations, and to obtain one of these sample files and then modify it to your host-specific details is easier than building the files from scratch. The number of options and details change with the release of smail, so check to see whether you have a complete version.
The router component of smail handles the resolution of destination addresses, routing to the next mail host for further forwarding, and determination of which transport should be used to send the message on. The router component performs a number of tasks, first determining whether the message is for a local or remote machine (using the variable values defined in /usr/lib/smail/config). If the message is for a local machine, the message is handed off to the director.
Previous | Table of Contents | Next |