home *** CD-ROM | disk | FTP | other *** search
- How to Configure a Host
-
- Here are step-by-step instructions and explanations:
-
- 1) cd sendmail.cf/
-
- 2) mkdir hostname (fill in your hostname)
-
- 3) cp skel/* hostname
- Copies skeleton versions of Makefile, options, trusted,
- defines, hostnames, relays, and relayrules
-
- 4) cd hostname
-
- 5) Edit defines
- This file contains global definitions for the configuration files.
- The options are:
- DOMAININNAME -
- Enable this option if your host uses the ARPA domain
- resolver, and/or your hostname (as returned by /bin/hostname)
- includes your domain (as in wjh12.harvard.edu)
- NODOMAINS -
- By default, hosts which are specified without a domain
- are assumed to be in the local domain. Defining 'NODOMAINS'
- suppresses this, so that hostname lookup is performed without
- appending the local domain.
- ANYDOMAIN -
- Recognize our hostname within any non-ARPA domain (e.g.,
- harvard.CSNET, harvard.BITNET, harvard.UUCP)
- PATHALIAS
- Enable this option if your host maintains a pathalias
- database for uucp (and other) host routing. You will
- also need to install the pathalias mailer 'pathsend'.
- You can also specify hosts which you talk to directly via
- UUCP which you would rather let pathalias generate a path to.
- TTYMAILER
- Enable this option to include the TTY mailer for the
- SMTP SEND command (if your sendmail supports this).
- ARPACLIENTS
- Use this option to rewrite the 'From: ' address of specific hosts
- to be as if they had been sent from this host when forwarding
- to the ARPAnet. This is a hack to deal with local hosts which
- do not appear in remote host tables.
- SENDDOMAIN
- Append our official domain to ALL mail, even local mail within
- our domain.
- MAILSLAVES
- This host has mail slaves, that is, hosts who forward ALL their
- mail to this host. Mail which is addressed to mail slaves of this
- host will be delivered locally to this host.
-
- To enable an option, include a line of the form:
- define(OPTIONNAME,1)
- e.g.,
- define(PATHALIAS,1)
-
- 6) Edit hostnames
- Define the name for this host as it should appear in 'From: ' lines
- as the macro 'J'. Usually this is set to the '/bin/hostname', that is,
- the same as the pre-defined macro '$w'.
-
- Define the names of any hosts whom we should accept mail for (that is,
- aliases for our hostname, or those hosts who share /usr/spool/mail with
- us) as the class 'J'. This MUST be the hostname WITHOUT the domain -
- if '$w' (that is, gethostname(2)) returns the hostname with the domain,
- then you should initialize this class from a file which contains the
- hostname without the domain, as in 'CJ/hostname'. You can also list
- the names of hosts which you would like to accept mail for here - this
- is useful for accepting mail for recently defunct hosts.
-
- Define the BITNET hostname for this host as the macro 'B'. This is used
- to generate return addresses when sending mail via BITNET.
-
- Define the class of BITNET hostnames to accept as this host as the class
- 'B'.
-
- Define the UUCP hostname for this host as the macro 'U'. This is used
- to generate return addresses when sending mail via UUCP.
-
- Define the class of UUCP hostnames to accept as this host as the class
- 'U'.
-
- 7) Edit relays
- Here is where the bulk of the configuration is. First, specify
- whether you can talk to the campus ETHERNET directly, or you must
- use a relay. If you must use a relay, use the m4 macro definition:
- define(ETHERRELAY,1)
- If you can mail directly to the campus ETHERNET, comment out this
- m4 macro definition as in:
- # define(ETHERRELAY,1)
- Note that a '#' character begins a comment in sendmail.cf files.
-
- If you do not talk to the ETHERNET directly, specify your ETHERNET
- relay as the sendmail macro 'G'. The list of hosts you should mail
- to via the ETHERNET should be kept in '/usr/local/lib/mail/mailhosts.ether'.
- The most up-to-date list can be retrieved via anonymous ftp from 'harvard'
- as 'mail/mailhosts.ether'.
-
- Similarly, specify whether you can talk to BITNET directly, or specify
- your BITNET relay as sendmail macro 'F'. The list of hosts you should
- mail to via BITNET is '/usr/local/lib/mail/mailhosts.bitnet', also
- available from 'harvard'.
-
- Similarly, specify whether you can talk to DECNET directly, or specify
- your DECNET relay as sendmail macro 'H'. The list of hosts you should
- mail to via DECNET is '/usr/local/lib/mail/mailhosts.decnet', also
- available from 'harvard'.
-
- Similarly, specify whether you can talk to the ARPAnet directly, or specify
- your ARPA relay as sendmail macro 'C'. It is assumed that there are no
- local hosts which you should mail to via the ARPAnet.
-
- Specify whether you wish to forward UUCP mail which is addressed to hosts
- you do not talk to directly to a UUCP relay. If so, define the host you
- wish to use as such as the sendmail macro 'E'. The list of hosts you
- talk to directly via UUCP should be kept in the file
- '/usr/local/lib/mail/mailhosts.uucp'. This list can be generated via
- 'awk' from the file '/usr/lib/uucp/L.sys' by saying 'make mailhosts.uucp'
- in this host subdirectory.
-
- Note that the list of all local hosts (and their aliases) is kept
- in the file '/usr/local/lib/mail/mailhosts'. This file is
- available from 'harvard' via anonymous ftp as 'mail/mailhosts'. It
- is not absolutely necessary that all local hosts be listed in this
- file, but it will allow arbitrarily addressing mail to local hosts
- as 'localhost!user' or 'user::localhost' and have this be exactly
- equivalent to 'user@localhost'.
-
- Now you must choose whether you want to specify a relay for all local mail
- which you cannot resolve, or a default mailer to try for those local hosts
- which you cannot resolve. I would recommend setting one host to be
- your 'smart' host, which is kept most up-to-date. I use 'harvard' for
- this, and you are welcome to as well. All my other hosts specify
- 'harvard' as their local relay (sendmail macro 'L'). 'harvard' uses
- 'ether-mailer' as its default mailer, so that any local host for which
- routing information is not explicitly known will first be forwarded
- to 'harvard', and then will try to be reached via the ETHERNET.
-
- Since not all top level domains are known at this time, you can specify
- a default host to relay mail to with domain specifications which you
- do not recognize (as sendmail macro 'N'). I would recommend specifying
- 'harvard' as your default domain relay - it will probably be the quickest
- to support new domains. Note that you can specify one of your own central
- hosts as this default domain relay, and then let this central host specify
- 'harvard' as its default domain relay - this will probably give you
- the greatest flexibility.
-
- Finally, you can specify a relay host to which all mail which should be
- delivered locally is forwarded, as sendmail macro 'R'. This is useful
- when you have a machine which is used primarily for communications,
- and a machine which has the same accounts but is used primarily by
- users, and is where the users want to read their mail. This is the
- case for 'harvard' and 'endor'. Most people at remote sites address
- mail to 'user@harvard...'. When this mail reaches 'harvard' it is
- automagically forwarded to 'user@endor', where it will be locally
- delivered to the user's mailbox.
-
- You can also specify local relaying and routing information here.
- See the section, "Defining Your Own Relay Rules".
-
- 8) Edit relayrules
-
- The address rewriting rules for local routing is specified here.
- Please see the section "Defining Your Own Relay Rules".
-
- 9) Type 'make'
- This will create the file 'sendmail.cf'.
-
-