home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail.cf / doc / 4.howto < prev    next >
Encoding:
Text File  |  1987-05-14  |  7.7 KB  |  169 lines

  1. How to Configure a Host
  2.  
  3. Here are step-by-step instructions and explanations:
  4.  
  5. 1) cd sendmail.cf/
  6.  
  7. 2) mkdir hostname (fill in your hostname)
  8.  
  9. 3) cp skel/* hostname
  10.     Copies skeleton versions of Makefile, options, trusted,
  11.     defines, hostnames, relays, and relayrules
  12.  
  13. 4) cd hostname
  14.  
  15. 5) Edit defines
  16.     This file contains global definitions for the configuration files.
  17.     The options are:
  18.     DOMAININNAME -
  19.         Enable this option if your host uses the ARPA domain
  20.         resolver, and/or your hostname (as returned by /bin/hostname)
  21.         includes your domain (as in wjh12.harvard.edu)
  22.     NODOMAINS -
  23.         By default, hosts which are specified without a domain
  24.         are assumed to be in the local domain.  Defining 'NODOMAINS'
  25.         suppresses this, so that hostname lookup is performed without
  26.         appending the local domain.
  27.     ANYDOMAIN -
  28.         Recognize our hostname within any non-ARPA domain (e.g.,
  29.         harvard.CSNET, harvard.BITNET, harvard.UUCP)
  30.     PATHALIAS
  31.         Enable this option if your host maintains a pathalias
  32.         database for uucp (and other) host routing.  You will
  33.         also need to install the pathalias mailer 'pathsend'.
  34.         You can also specify hosts which you talk to directly via
  35.         UUCP which you would rather let pathalias generate a path to.
  36.     TTYMAILER
  37.         Enable this option to include the TTY mailer for the
  38.         SMTP SEND command (if your sendmail supports this).
  39.     ARPACLIENTS
  40.         Use this option to rewrite the 'From: ' address of specific hosts
  41.         to be as if they had been sent from this host when forwarding
  42.         to the ARPAnet.  This is a hack to deal with local hosts which
  43.         do not appear in remote host tables.
  44.     SENDDOMAIN
  45.         Append our official domain to ALL mail, even local mail within
  46.         our domain.
  47.     MAILSLAVES
  48.         This host has mail slaves, that is, hosts who forward ALL their
  49.         mail to this host.  Mail which is addressed to mail slaves of this
  50.         host will be delivered locally to this host.
  51.  
  52.     To enable an option, include a line of the form:
  53.     define(OPTIONNAME,1)
  54.     e.g.,
  55.     define(PATHALIAS,1)
  56.  
  57. 6) Edit hostnames
  58.     Define the name for this host as it should appear in 'From: ' lines
  59.     as the macro 'J'.  Usually this is set to the '/bin/hostname', that is,
  60.     the same as the pre-defined macro '$w'.
  61.  
  62.     Define the names of any hosts whom we should accept mail for (that is,
  63.     aliases for our hostname, or those hosts who share /usr/spool/mail with
  64.     us) as the class 'J'.  This MUST be the hostname WITHOUT the domain -
  65.     if '$w' (that is, gethostname(2)) returns the hostname with the domain,
  66.     then you should initialize this class from a file which contains the
  67.     hostname without the domain, as in 'CJ/hostname'.  You can also list
  68.     the names of hosts which you would like to accept mail for here - this
  69.     is useful for accepting mail for recently defunct hosts.
  70.  
  71.     Define the BITNET hostname for this host as the macro 'B'.  This is used
  72.     to generate return addresses when sending mail via BITNET.
  73.  
  74.     Define the class of BITNET hostnames to accept as this host as the class
  75.     'B'.
  76.  
  77.     Define the UUCP hostname for this host as the macro 'U'.  This is used
  78.     to generate return addresses when sending mail via UUCP.
  79.  
  80.     Define the class of UUCP hostnames to accept as this host as the class
  81.     'U'.
  82.  
  83. 7) Edit relays
  84.     Here is where the bulk of the configuration is.  First, specify
  85.     whether you can talk to the campus ETHERNET directly, or you must
  86.     use a relay.  If you must use a relay, use the m4 macro definition:
  87.     define(ETHERRELAY,1)
  88.     If you can mail directly to the campus ETHERNET, comment out this
  89.     m4 macro definition as in:
  90.     # define(ETHERRELAY,1)
  91.     Note that a '#' character begins a comment in sendmail.cf files.
  92.  
  93.     If you do not talk to the ETHERNET directly, specify your ETHERNET
  94.     relay as the sendmail macro 'G'.  The list of hosts you should mail
  95.     to via the ETHERNET should be kept in '/usr/local/lib/mail/mailhosts.ether'.
  96.     The most up-to-date list can be retrieved via anonymous ftp from 'harvard'
  97.     as 'mail/mailhosts.ether'.
  98.  
  99.     Similarly, specify whether you can talk to BITNET directly, or specify
  100.     your BITNET relay as sendmail macro 'F'.  The list of hosts you should
  101.     mail to via BITNET is '/usr/local/lib/mail/mailhosts.bitnet', also
  102.     available from 'harvard'.
  103.  
  104.     Similarly, specify whether you can talk to DECNET directly, or specify
  105.     your DECNET relay as sendmail macro 'H'.  The list of hosts you should
  106.     mail to via DECNET is '/usr/local/lib/mail/mailhosts.decnet', also
  107.     available from 'harvard'.
  108.  
  109.     Similarly, specify whether you can talk to the ARPAnet directly, or specify
  110.     your ARPA relay as sendmail macro 'C'.  It is assumed that there are no
  111.     local hosts which you should mail to via the ARPAnet.
  112.  
  113.     Specify whether you wish to forward UUCP mail which is addressed to hosts
  114.     you do not talk to directly to a UUCP relay.  If so, define the host you
  115.     wish to use as such as the sendmail macro 'E'.  The list of hosts you
  116.     talk to directly via UUCP should be kept in the file
  117.     '/usr/local/lib/mail/mailhosts.uucp'.  This list can be generated via
  118.     'awk' from the file '/usr/lib/uucp/L.sys' by saying 'make mailhosts.uucp'
  119.     in this host subdirectory.
  120.  
  121.     Note that the list of all local hosts (and their aliases) is kept
  122.     in the file '/usr/local/lib/mail/mailhosts'.  This file is
  123.     available from 'harvard' via anonymous ftp as 'mail/mailhosts'.  It
  124.     is not absolutely necessary that all local hosts be listed in this
  125.     file, but it will allow arbitrarily addressing mail to local hosts
  126.     as 'localhost!user' or 'user::localhost' and have this be exactly
  127.     equivalent to 'user@localhost'.
  128.  
  129.     Now you must choose whether you want to specify a relay for all local mail
  130.     which you cannot resolve, or a default mailer to try for those local hosts
  131.     which you cannot resolve.  I would recommend setting one host to be
  132.     your 'smart' host, which is kept most up-to-date.  I use 'harvard' for
  133.     this, and you are welcome to as well.  All my other hosts specify
  134.     'harvard' as their local relay (sendmail macro 'L').  'harvard' uses
  135.     'ether-mailer' as its default mailer, so that any local host for which
  136.     routing information is not explicitly known will first be forwarded
  137.     to 'harvard', and then will try to be reached via the ETHERNET.
  138.  
  139.     Since not all top level domains are known at this time, you can specify
  140.     a default host to relay mail to with domain specifications which you
  141.     do not recognize (as sendmail macro 'N').  I would recommend specifying
  142.     'harvard' as your default domain relay - it will probably be the quickest
  143.     to support new domains.  Note that you can specify one of your own central
  144.     hosts as this default domain relay, and then let this central host specify
  145.     'harvard' as its default domain relay - this will probably give you
  146.     the greatest flexibility.
  147.  
  148.     Finally, you can specify a relay host to which all mail which should be
  149.     delivered locally is forwarded, as sendmail macro 'R'.  This is useful
  150.     when you have a machine which is used primarily for communications,
  151.     and a machine which has the same accounts but is used primarily by
  152.     users, and is where the users want to read their mail.  This is the
  153.     case for 'harvard' and 'endor'.  Most people at remote sites address
  154.     mail to 'user@harvard...'.  When this mail reaches 'harvard' it is
  155.     automagically forwarded to 'user@endor', where it will be locally
  156.     delivered to the user's mailbox.
  157.  
  158.     You can also specify local relaying and routing information here.
  159.     See the section, "Defining Your Own Relay Rules".
  160.  
  161. 8) Edit relayrules
  162.  
  163.     The address rewriting rules for local routing is specified here.
  164.     Please see the section "Defining Your Own Relay Rules".
  165.  
  166. 9) Type 'make'
  167.     This will create the file 'sendmail.cf'.
  168.  
  169.