Previous | Table of Contents | Next |
The sendmail program can define macros and classes in response to commands from the sendmail.cf file by looking up values in the sendmailvars configuration table. The sendmail.cf file can contain two such commands:
The L command has the following syntax:
LXsearch_key
For example, in Lm maildomain, the search key maildomain is used to look up a value in the configuration table to assign to the variable m. Most often the single-letter variable name is uppercase, but for internal variables (such as m for the mail domain name), it is lowercase.
NOTE: Lowercase variables are reserved for use by sendmail and may have special meanings to the sendmail program.
The G command, which sets a class, permits multiple entries. It has the following syntax:
GCsearch_key
For example, in GVuucp-list, the search key uucp-list is used to look up a value in the configuration table to assign to the class V.
In both cases, matching of the search key is case-sensitive. Both commands have counterparts for defining macros or classes within the sendmail.cf file rather than using the lookup table. D is the counterpart of L; C is the counterpart of G.
If NIS+ is used to administer the network, you can maintain a global version of the table sendmailvars.org_dir. In addition to the NIS+ table (or as an alternative), the table can be maintained in /etc/mail/sendmailvars files. The order in which these sources are searched by sendmail is controlled by the sendmailvars entry in the /etc/nsswitch.conf file. By default, the search order is files nisplus, which means that sendmail looks for information in the local table before going to the NIS+ table.
Entries in an /etc/mail/sendmailvars file have the following format:
search_key value1 [value2 value3 . . . ]
The search key may be followed by a Tab or a number of spaces; values are separated by a single space.
The NIS+ sendmailvars table has two columns: a Key column and a Value column. The Value column can have one or more values, each separated by a space, as shown in Table 1-8.
Key Column | Value Column |
---|---|
maildomain | Eng.Sun.COM |
uucp-list | castle oak cinderella |
The names in the Value column are systems that uucp can access.You should define most nondefault mail variables in the NIS+ table. However, in special cases--such as when a system has a local uucp connection or is a gateway between two Internet domains--you can override the global setting for a variable on a system by including the variable in the system's local /etc/mail/sendmailvars file.
Users can create a .forward file in their home directory that sendmail uses to temporarily redirect mail or send mail to a custom set of programs without bothering a system administrator with frequent alias change requests. When troubleshooting mail problems, particularly problems of mail not being delivered to the expected address, always check the user's home directory for a .forward file.
The following sections describe the directory structure and files of the mail service and explain how the sendmail program and mail addressing work.
Files for the mail service are located in three directories: /bin, /etc/mail, and /usr/lib. Users' mailboxes are located in the /var/mail directory.
Table 1-9 shows the contents of the /bin directory that are used for mail services.
Name | Type | Description |
---|---|---|
File | A user agent | |
mailcompat | File | A filter to store mail in SunOS 4.x mailbox format |
mailq | Link | Link to /usr/lib/sendmail |
mailstats | File | A file used to store mail statistics generated by the /etc/mail/sendmail.st file (if present) |
mailx | File | A user agent |
newaliases | Link | Link to /usr/lib/sendmail that is used to rebuild the database for the mail aliases file |
Previous | Table of Contents | Next |