Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
26.  Mail Services (Reference) Mail Service Programs and Files sendmail Program sendmail Features  Previous   Contents   Next 
   
 

sendmail Configuration File

A configuration file controls the way that sendmail performs its functions. The configuration file determines the choice of delivery agents, address rewriting rules, and the format of the mail header.

The sendmail program uses the information from the /etc/mail/sendmail.cf file to perform its functions. Each system has a default sendmail.cf file that is installed in the /etc/mail directory. You do not need to edit or change the default configuration file for mail servers or mail clients. The only systems that require a customized configuration file are mail hosts and mail gateways.

The Solaris operating environment provides three default configuration files in the /etc/mail directory.

  1. A configuration file that is named main.cf for the system (or systems) you designate as the mail host or a mail gateway

  2. A configuration file that is named subsidiary.cf, which is a duplicate copy of the default sendmail.cf file

  3. A configuration file that is named submit.cf, which is used to run sendmail in mail submission program mode, instead of daemon mode. For more information, refer to "New Configuration File, submit.cf".

The configuration file you use on a system depends on the role of the system in your mail service.

The following list describes some configuration parameters you can change, depending on the requirements of your site.

  • Time values, which specify the following information.

  • Delivery modes, which specify how quickly mail is delivered.

  • Load limits, which increase efficiency during busy periods by not attempting to deliver large messages, messages to many recipients, and messages to sites that have been down for a long time.

  • Log level, which specifies the kinds of problems that are logged.

Mail Alias Files

You can use any of the following files, maps, or tables to maintain aliases.

Your method of maintaining aliases depends on who uses the alias and who needs to be able to change the alias. Each type of alias has unique format requirements.

If you are looking for task information, refer to "Administering Mail Alias Files (Task Map)" in Chapter 25, Mail Services (Tasks).

.mailrc Aliases

Aliases that are listed in a .mailrc file are accessible only by the user who owns the file. This restriction enables users to establish an alias file they control and that is usable only by its owner. Aliases in a .mailrc file adhere to the following format.

alias aliasname value value value ...

aliasname is the name that the user uses when sending mail, and value is a valid email address.

If a user establishes a personal alias for scott that does not match the email address for scott in the name service, mail is routed to the wrong person when people try to reply to mail that is generated by this user. The only workaround is to use any of the other aliasing mechanisms.

/etc/mail/aliases File

Any alias that is established in the /etc/mail/aliases file can be used by any user who knows the name of the alias and the host name of the system that contains the file. Distribution list formats in a local /etc/mail/aliases file adhere to the following format.

aliasname: value,value,value ...

aliasname is the name that the user uses when sending mail to this alias, and value is a valid email address.

If your network is not running a name service, the /etc/mail/aliases file of each system should contain entries for all mail clients. You can either edit the file on each system or edit the file on one system and copy it to each of the other systems.

The aliases in the /etc/mail/aliases file are stored in text form. When you edit the /etc/mail/aliases file, you need to run the newaliases program to recompile the database and make the aliases available in binary form to the sendmail program. For task information, refer to "How to Set Up a Local Mail Alias File" in Chapter 25, Mail Services (Tasks). Otherwise, you can use the AdminTool's Database Manager to administer the mail aliases that are stored in the local /etc files.

You can create aliases for only local names--a current host name or no host name. For example, an alias entry for user ignatz who has a mailbox on the system saturn would have the following entry in the /etc/mail/aliases file.

ignatz: ignatz@saturn

You should create an administrative account for each mail server. You create such an account by assigning a mailbox on the mail server to root and by adding an entry for root to the /etc/mail/aliases file. For example, if the system saturn is a mailbox server, add the entry root: sysadmin@saturn to the /etc/mail/aliases file.

Normally, only the root user can edit this file. However, when you use the Administration Tool, all users in group 14, which is the sysadmin group, can change the local file. Another option is to create the following entry.
aliasname: :include:/path/aliasfile

aliasname is the name that the user uses when sending mail, and /path/aliasfile is the full path to the file that contains the alias list. The alias file should include email entries, one entry on each line, and no other notations.

user1@host1
user2@host2

You can define additional mail files in /etc/mail/aliases to keep a log or a backup copy. The following entry stores all mail that is sent to aliasname in filename.

aliasname: /home/backup/filename

You can also route the mail to another process. The following example stores a copy of the mail message in filename and prints a copy.

aliasname: "|tee -a /home/backup/filename |lp"

For a task map, refer to "Administering Mail Alias Files (Task Map)" in Chapter 25, Mail Services (Tasks).

NIS aliases Map

All users in a local domain can use the entries that are in the NIS aliases map, because the sendmail program can use the NIS aliases map instead of the local /etc/mail/aliases files to determine mailing addresses. For more information, refer to the nsswitch.conf(4) man page.

Aliases in the NIS aliases map adhere to the following format.

aliasname: value,value,value ...

aliasname is the name that the user uses when sending mail, and value is a valid email address.

The NIS aliases map should contain entries for all mail clients. In general, only the root user on the NIS master can change these entries. This type of alias might not be a good choice for aliases that are constantly changing, but such aliases can be useful if the aliases point to another alias file, as in the following syntax example.

aliasname: aliasname@host

aliasname is the name that the user uses when sending mail, and host is the host name for the server that contains an /etc/mail/alias file.

For task information, refer to "How to Set Up an NIS mail.aliases Map" in Chapter 25, Mail Services (Tasks).

 
 
 
  Previous   Contents   Next