Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
26.  Mail Services (Reference) Mail Service Programs and Files Contents of the /etc/mail Directory  Previous   Contents   Next 
   
 

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

mail.local

File

Mailer that delivers mail to mailboxes.

sendmail

File

Routing program, also known as the mail transfer agent.

smrsh

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

README

File

Describes the configuration files.

cf

Directory

Provides site-dependent and site-independent descriptions of hosts.

cf/main.mc

File

Previously named cf/main-v7sun.mc. Is the main configuration file.

cf/makefile

File

Provides rules for building new configuration files.

cf/submit.mc

File

Is the configuration file for the mail submission program (MSP), which is used to submit messages.

cf/subsidiary.mc

File

Previously named cf/subsidiary-v7sun.mc. Is the configuration file for hosts that NFS-mount /var/mail from another host.

domain

Directory

Provides site-dependent subdomain descriptions.

domain/generic.m4

File

Is the generic domain file from Berkeley.

domain/solaris-antispam.m4

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.

domain/solaris-generic.m4

File

Is the default domain file with changes that make sendmail function like previous Solaris versions.

feature

Directory

Contains definitions of specific features for particular hosts (see README for a full description of the features).

m4

Directory

Contains site-independent include files.

mailer

Directory

Contains definitions of mailers, which include local, smtp, and uucp.

ostype

Directory

Describes various operating system environments.

ostype/solaris2.m4

File

Defines default local mailer as mail.local.

ostype/solaris2.ml.m4

File

Defines default local mailer as mail.local.

ostype/solaris2.pre5.m4

File

Defines local mailer as mail.

ostype/solaris8.m4

File

Defines local mailer as mail.local (in LMTP mode), enables IPv6, specifies /var/run as the directory for the sendmail.pid file.

sh

Directory

Contains shell scripts that are used by the m4 build process and migration aids.

sh/check-permissions

File

Checks permissions of :include: aliases and .forward files and their parent directory path for correct permissions.

sh/check-hostname

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

Name

Type

Description

sendmailvars.org_dir

Table

NIS+ version of sendmailvars file.

/etc/default/sendmail

File

Lists the environment variables for the startup script for sendmail.

/etc/shells

File

Lists the valid login shells.

/usr/sbin/editmap

File

Queries and edits single records in database maps for sendmail.

/usr/sbin/in.comsat

File

Mail notification daemon.

/usr/sbin/makemap

File

Builds binary forms of keyed maps.

/usr/sbin/newaliases

Link

A link to /usr/lib/sendmail. Used to create the binary form of the alias database. Previously in /usr/bin.

/usr/sbin/syslogd

File

Error message logger, used by sendmail.

/usr/sbin/etrn

File

Perl script for starting the client-side remote mail queue.

/usr/dt/bin/dtmail

File

CDE mail user agent.

/var/mail/mailbox1, /var/mail/mailbox2

File

Mailboxes for delivered mail.

/var/spool/clientmqueue

Directory

Storage for mail that is delivered by the client daemon.

/var/spool/mqueue

Directory

Storage for mail that is delivered by the master daemon.

$OPENWINHOME/bin/mailtool

File

Window-based mail user agent.

/var/run/sendmail.pid

File

File that lists the PID of the listening daemon.

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.

  1. 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.

  2. The message is collected by the program that generated it and is passed to the sendmail daemon.

  3. 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.

  4. The sendmail daemon passes the message to the appropriate system.

  5. 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.

  6. 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

 
 
 
  Previous   Contents   Next