[Next] [Previous] [Up] [Top] [Contents]

CHAPTER 26 Mail

26.2 Network mail configuration file


The configuration file used by sendmail is /etc/sendmail.cf (SunOS 4.1.X) or /etc/mail/sendmail.cf (SunOS 5.X). This file is read by sendmail when you start it up. It includes macros that define how header information is to be processed. Values in the header might be ignored, changed, or additional lines might be added to the header to assist in the delivery of mail. One of the important steps is the address re-writing rules. These rules search for patterns and replace them with specified strings. It also specifies the location of files and directories to be used by sendmail. These are generally, /var/spool/mail (SunOS 4.1.X) or /usr/mail (SunOS 5.X) for mail delivered to users on your machine, /usr/spool/mqueue for undelivered mail storage, and /var/spool/mqueue/syslog or /var/log/syslog for the mail log file.

Within sendmail.cf one macro might specify your Internet subdomain, e.g.:

## Change the D and E macros to accommodate your subdomains.

## Note that this configuration will do its very best to generate all addresses as coming from $D.

DDacs.ohio-state.edu

DEohio-state.edu

The "D" in the first column "defines" the following D and E as acs.ohio-state.edu and ohio-state.edu, respectively. These can be recalled later in the file as $D and $E.

Another macro might specify the style of a header line, e.g.:

## Pick one of the next 2 lines, based on your syntactic preference for

## "joe@host.domain (Joe Random)" or "Joe Random <joe@host.domain>".

#Dq$g$?x ($x)$.

Dq$?x$x $.<$g>

And still another might specify where to forward BITNET mail:

# Strange nonstandard nets - attempt to hand to forwarder.

R$+<@$+.bitnet> $@$>0$1%$2.bitnet<@ohstbh.acs.ohio-state.edu>

The syntax of the re-writing rules is explained in the Sun AnswerBook Mail Administration Guide and in the book sendmail by Costales, et.al.


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]