Contents of the /usr/lib Directory
Table 26-9 shows the contents of the /usr/lib directory, which is used for mail services.
Table 26-9 Contents of the /usr/lib Directory
Name | Type | Description |
---|---|---|
File | Mailer that delivers mail to mailboxes. | |
File | Routing program, also known as the mail transfer agent. | |
File | Shell program (sendmail restricted shell) that uses the "|program" syntax of sendmail to restrict programs that sendmail can run to those programs listed in the /var/adm/sm.bin directory. Refer to the smrsh(1M) man page for recommendations on what to include in /var/adm/sm.bin. To enable, include this m4 command, FEATURE(`smrsh'), in your mc file. |
Contents of the /usr/lib/mail Directory
Within the /usr/lib directory is a subdirectory, mail, that contains all of the necessary files to build a sendmail.cf file. The contents of mail are shown in Table 26-10.
Table 26-10 Contents of the /usr/lib/mail Directory Used for Mail Services
Name | Type | Description |
---|---|---|
File | Describes the configuration files. | |
Directory | Provides site-dependent and site-independent descriptions of hosts. | |
File | Previously named cf/main-v7sun.mc. Is the main configuration file. | |
File | Provides rules for building new configuration files. | |
File | Is the configuration file for the mail submission program (MSP), which is used to submit messages. | |
File | Previously named cf/subsidiary-v7sun.mc. Is the configuration file for hosts that NFS-mount /var/mail from another host. | |
Directory | Provides site-dependent subdomain descriptions. | |
File | Is the generic domain file from Berkeley. | |
File | Is the domain file with changes that make sendmail function like previous Solaris versions. However, relaying is disabled completely, sender addresses with no host name are rejected, and unresolvable domains are rejected. | |
File | Is the default domain file with changes that make sendmail function like previous Solaris versions. | |
Directory | Contains definitions of specific features for particular hosts (see README for a full description of the features). | |
Directory | Contains site-independent include files. | |
Directory | Contains definitions of mailers, which include local, smtp, and uucp. | |
Directory | Describes various operating system environments. | |
File | Defines default local mailer as mail.local. | |
File | Defines default local mailer as mail.local. | |
File | Defines local mailer as mail. | |
File | Defines local mailer as mail.local (in LMTP mode), enables IPv6, specifies /var/run as the directory for the sendmail.pid file. | |
Directory | Contains shell scripts that are used by the m4 build process and migration aids. | |
File | Checks permissions of :include: aliases and .forward files and their parent directory path for correct permissions. | |
File | Verifies that sendmail is able to determine the fully qualified host name. |
Other Files Used for Mail Services
Several other files and directories are used for mail services, as shown in Table 26-11.
Table 26-11 Other Files Used for Mail Services
Interactions of Mail Programs
Mail services are provided by a combination of the following programs, which interact as shown in the simplified illustration in Figure 26-2.
Figure 26-2 Interactions of Mail Programs
For a more detailed illustration, refer to the figure in "sendmail Features".
The following is a description of the interactions of mail programs.
Users send messages by using programs such as mailx or mailtool. See the man pages for mailx(1) or mailtool(1) for information about these programs.
The message is collected by the program that generated it and is passed to the sendmail daemon.
The sendmail daemon parses the addresses (divides them into identifiable segments) in the message. The daemon uses information from the configuration file, /etc/mail/sendmail.cf, to determine network name syntax, aliases, forwarding information, and network topology. By using this information, sendmail determines the route a message must follow to get to a recipient.
The sendmail daemon passes the message to the appropriate system.
The /usr/lib/mail.local program on the local system delivers the mail to the mailbox in the /var/mail/username directory of the recipient of the message.
The recipient is notified that mail has arrived and retrieves it by using mail, mailx, mailtool, or a similar program.
sendmail Program
The following list describes some of the capabilities of the sendmail program.
sendmail can use different types of communications protocols, such as TCP/IP and UUCP.
sendmail implements an SMTP server, message queueing, and mailing lists.
sendmail controls name interpretation by using a pattern-matching system that can work with the following naming conventions.
Domain-based naming convention. The domain technique separates the issue of physical versus logical naming. For more information on domains, refer to "Mail Addresses".
Improvised techniques, such as providing network names that appear local to hosts on other networks.
Arbitrary (older) naming syntaxes.
Disparate naming schemes.
The Solaris operating environment uses the sendmail program as a mail router. The following list describes some of its functions.
sendmail is responsible for receiving and delivering email messages.
sendmail is an interface between mail-reading programs such as mail, mailx, and mailtool, and mail-transport programs such as uucp.
sendmail controls email messages that users send.
By evaluating the recipients' addresses
By choosing an appropriate delivery program
By rewriting the addresses in a format that the delivery agent can handle
By reformatting the mail headers as required
By finally passing the transformed message to the mail program for delivery