home *** CD-ROM | disk | FTP | other *** search
- [ netinfo/sendmail-cf-doc.txt ]
-
- From: Erik Fair
-
- There are two generic sendmail configuration files that I've created:
-
- internet-generic.cf - for Internet-only hosts
- generic.cf - for hosts using both Internet and UUCP
-
- NOTE: The NIC's filenames are:
-
- netinfo/sendmail-internet-generic.txt
- netinfo/sendmail-generic.txt
-
- The basic assumptions are:
-
- If you're an internet host, you're registered (i.e. in
- hosts.txt from the NIC. If you're not, you need to be "hidden"
- behind the name of a host that is registered, in the form:
- user%un
- do that).
-
- If you're an internet host, you're not using the domain name
- server (if you are, why are you bothering with these config
- files?).
-
- The gethostname(2) system call returns your unqualified
- official hostname (e.g. "ucbvax", instead of "ucbvax.berkeley.edu").
- This is set by hostname(1), usually in /etc/rc.local at boot
- time, but this can be overridden for the purposes of Email by a
- config file definition.
-
- If you use UUCP, the gethostname(2) system call returns your
- UUCP name (i.e. your UUCP name is the last component of your
- fully qualified hostname). This also can be overridden.
-
- OK, the nitty-gritty. The NIC is about to, or already has, issued a
- HOSTS.TXT that no longer has any of the non-domainist aliases (e.g.
- ucbvax.berkeley.edu doesn't have "berkeley" or "ucbvax" its aliases any
- more). As such, you must be prepared to use fully qualified domain
- names in all your correspondence. Unfortunately, the sendmail
- configuration file distributed with 4.2 BSD (but NOT 4.3 BSD) is
- incapable of handling this right. Thus the distribution of my config
- files.
-
- To use these, you have to pick one of the generic files, add your
- local information to it (all your hostnames & aliases, UUCP sites you
- speak to, etc), and install it as /usr/lib/sendmail.cf.
-
- So, here is the stuff you need to change to use these sendmail
- configuration files:
-
- internet-generic.cf
-
- There are two configuration items here: macro "w" and class "w".
- Case of a macro or class name is significant. A macro is a string.
- A class is an array of strings.
-
- Macro "w" is usually defined by whatever comes back from the
- gethostname(2) system call. You can look at this by using the
- "hostname" program. When you add ".arpa" to what "hostname" prints, you
- should get your official host name. For example, for site lll-tis-b.arpa,
-
- % hostname
- lll-tis-b
-
- is correct. If, for whatever reason, "hostname" returns something OTHER
- than the first component of your official Internet host name, then you
- need to add to the configuration file, (for example)
-
- Dwlll-tis-b
-
- This defines macro "w" to be "lll-tis-b" which will have the desired
- effect.
-
- Class "w" is a list of all the names that your host is known by.
- This should contain your hostname, and all aliases for your host.
- Using the same example as above:
-
- Cwlll-tis-b lll-tis-gw tis-b tis-styx styx
-
- If you need more than one line, use as many lines as you need,
- beginning each line in "Cw"
-
- If by some misfortune you run System V UNIX instead of 4BSD, but you
- still have sendmail, it is still possible for you to use these
- configuration files, but you will have to find the local mailer
- definition (this is what sendmail will call to actually stuff a letter
- in a local mailbox) which is a line which matches the "^Mlocal"
- regular expression, and read the comment surrounding it.
-
- generic.cf
-
- This configuration file needs the same information as internet-generic.cf,
- but also some stuff about UUCP: macro "U" and class "U". Note that it
- is also important for your UUCP name to be in class "w" along with your
- internet names.
-
- Macro "U" should be defined to be your UUCP name. If your UUCP name is
- not the same as what gets returned from gethostname(2) (i.e. it's not
- the first component of your official internet host name), then you
- have to change the definition of macro "U" in the config file from
-
- DU$w
-
- to
-
- DUyour-uucp-name-here
-
- In the case of "lll-tis-b.arpa", whose UUCP name is "styx", this would
- read:
-
- DUstyx
-
- Class "U" is the list of all the UUCP sites that you speak to. This
- will have to be updated each time you change the L.sys file in order
- for UUCP mail to get through. Use as many lines as you need, beginning
- each line with "CU", and separating the names with spaces.
-
- I N S T A L L A T I O N
-
- Having made the required changes to reflect your local names, you need
- to install this. So, how?
-
- First, copy the old sendmail config file to a backup file, just in
- case.
-
- Second, copy the new, improved sendmail config that you've just
- edited to /usr/lib/sendmail.cf
-
- Third, if you're using the frozen config file stuff (this is something
- that saves time on sendmail start up, look for a non-zero length file
- name /usr/lib/sendmail.fc), run /usr/lib/sendmail -bz (to re-freeze the
- new config file; note that if you use frozen config files, when ever
- you make a change to your config file you have to do this)
-
- Forth, kill the sendmail daemon that is offering SMTP service to the
- network (look for a sendmail process with a PID typically less than
- 200, and kill it), and restart it with the same arguments as in
- /etc/rc.local (usually, -bd -q30m, which means "run in daemon mode,
- offer SMTP service to the network, and do a queue run every 30
- minutes). The reason that you have to do this is that sendmail reads
- its configuration file once upon start up, and so the daemon offering
- SMTP service is still using the old config file, despite the fact that
- you've installed a new one.
-
- You're done. You have a new sendmail configuration file installed and
- operating which will handle fully qualified domain names in /etc/hosts.
-
- If you have problems with this configuration file, please drop a note
- to me, Erik Fair, at <fair@ucbarpa.berkeley.edu>, and be sure to
- include headers of errant messages in your problem report. I give no
- guarantee of merchantability, fitness for particular purpose or
- warrantee, but I will *try* to help if you have a problem.
-
- Erik E. Fair ucbvax!fair fair@ucbarpa.berkeley.edu
-
- April 3, 1987
-
-