home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / aus / mail / 237 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  8.4 KB

  1. Path: sparky!uunet!munnari.oz.au!ariel.ucs.unimelb.EDU.AU!ariel.ucs.unimelb.EDU.AU!not-for-mail
  2. From: ray@ariel.ucs.unimelb.EDU.AU (Douglas Ray)
  3. Newsgroups: aus.mail
  4. Subject: sunOS mail config
  5. Date: 23 Dec 1992 10:23:47 +1100
  6. Organization: University of Melbourne
  7. Lines: 237
  8. Message-ID: <1h8823INN86e@ariel.ucs.unimelb.EDU.AU>
  9. NNTP-Posting-Host: ariel.ucs.unimelb.edu.au
  10. Summary: Re:  How to fix a cranky SUN sendmail system
  11. Keywords: request comments
  12.  
  13.  
  14. This is a step-by-step guide to configuring the SunOS 4.x sendmail, for
  15. networks using IP and DNS, originally posted by paul pomes.  Config is
  16. based on the sendmail.main.cf file, and uses the DDN mailer.  I've
  17. commented in some changes, and would like feedback.
  18.  
  19.                         - douglas ray
  20.                         doug@unimelb.edu.au
  21.                         networks & comms
  22.  
  23. --------------------------------------------------------------------------
  24. [comments by douglas ray: doug@unimelb.edu.au]
  25.  
  26. From: Paul Pomes <p-pomes@uiuc.edu>
  27. Date: Fri Sep  4 13:57:55 CDT 1992
  28. Subject: How to fix a cranky SUN sendmail system
  29. --------
  30. (Comments welcome)
  31.  
  32.         How to Fix a Cranky SUN Mail System.
  33.  
  34.  
  35. 1) Kill the existing sendmail daemon process.
  36.  
  37.    ps waux | grep sendmail
  38.    kill <pid>    where <pid> is the process id of the daemon.
  39.  
  40. 2) Replace the default sendmail executable with the SUN-supplied version
  41.    that understands use of the DNS.  Zap any frozen config file present.
  42.  
  43.    cd /usr/lib
  44.    cp sendmail sendmail.nomx
  45.    chmod 755 sendmail.nomx
  46.    cp sendmail.mx sendmail
  47.    chmod 4511 sendmail
  48.    rm -f /usr/lib/sendmail.fc /etc/sendmail.fc /etc/mail/sendmail.fc
  49.  
  50. 3) Establish a /etc/resolv.conf file to direct DNS queries to a server.
  51.    The values of "domain" and the "nameserver" lines depends critically
  52.    on where you are.  At the University of Illinois the value of domain
  53.    is typically your department or office name combined with "uiuc.edu".
  54.    Long names, e.g., Personnel Services Office, are typically abbreviated
  55.    (pso.uiuc.edu).  Examples: math.uiuc.edu, life.uiuc.edu, ncsa.uiuc.edu.
  56.  
  57.    Some institutions have a one domain fits all name.  An example of
  58.    this is the US Army Corps of Engineers, Construction Engineering
  59.    Research Lab locally known as US Army CERL.  Army policy specifies
  60.    that domain names must use their official acronym with the "army.mil"
  61.    domain.  So CERL's domain name is "cecer.army.mil".  Adding a fourth
  62.    domain to distinguish internal departments and divisions would have
  63.    made the names overly long.  Thus all CERL hosts are named
  64.    foo.cecer.army.mil.
  65.  
  66.    Selecting nameservers must be done in consultation with your local
  67.    network expert.  At the University of Illinois (and ONLY here please)
  68.    the following values can be used.
  69.  
  70.    domain foo.uiuc.edu        (replace foo with your official domain)
  71.    nameserver 128.174.5.59
  72.    nameserver 128.174.5.50
  73.    nameserver 128.174.5.58
  74.  
  75.    At US Army CERL, use the following:
  76.  
  77.    domain cecer.army.mil
  78.    nameserver 129.229.20.254
  79.    nameserver 129.229.1.5
  80.  
  81.    N.B., SUN's resolver code is based on BIND v4.8.1 and suffers from several
  82.    problems.  Chief among those is zero fault tolerance.  If the first listed
  83.    nameserver is unreachable or dead, the resolver won't try any of the
  84.    subsequently listed servers.  Re-compiling both sendmail and libresolv.a
  85.    from modern sources is the only fix for this.
  86.  
  87. 4) Copy the "main" sendmail.cf base file to sendmail.cf.
  88.    Under SUN-OS 4.X use
  89.  
  90.    cp /usr/lib/sendmail.main.cf /etc/sendmail.cf
  91.  
  92.    Under SUN-OS 5.X use
  93.  
  94.    cd /etc/mail
  95.    cp main.cf sendmail.cf
  96.  
  97.  
  98. Now that the base work has been done you have a choice: death or chi-chi.
  99. No, that's another sick joke.  Let's stick to SUNs and retain what shreds
  100. of dignity we can.  Onward.
  101.  
  102. The next set of steps involve changes to the sendmail.cf file.  Invoke the
  103. editor of your choice on /etc/sendmail.cf or /etc/mail/sendmail.cf.
  104.  
  105. 5) Change the value of the $j greeting macro.  Macros are defined with
  106.    lines beginning with 'D'.  Thus the $j macro is defined on a line
  107.    beginning with 'Dj'.  Change sendmail.cf (nee main.cf) to look like
  108.  
  109.    # my official hostname
  110.    # You have two choices here.  If you want the gateway machine to identify
  111.    # itself as the DOMAIN, use this line:
  112.    #Dj$m
  113.    # If you want the gateway machine to appear to be INSIDE the domain, use:
  114.    #Dj$w.$m
  115.    # Unless you are using sendmail.mx (or have a fully-qualified hostname), use:
  116.    Dj$w
  117.  
  118.    (Comment out the Dj$m entry and enable the Dj$w entry.)
  119.  
  120. 6) Select the proper mailer for forwarding to a smarter relay.  In the
  121.    case of a site connected to the Internet, this is the "ddn" mailer.
  122.    Change to:
  123.  
  124.    # major relay mailer - typical choice is "ddn" if you are on the
  125.    # Defense Data Network (e.g. Arpanet or Milnet)
  126.    #DMsmartuucp
  127.    DMddn
  128.  
  129. 7) Select the smarter relay to handle messages to unknown destinations.
  130.    This MUST be selected on a per-site basis.
  131.  
  132.    At the University of Melbourne *ONLY*
  133.  
  134.    # major relay host: use the $M mailer to send mail to other domains
  135.    DRmailhost.its.unimelb.edu.au
  136.    CRmailhost.its.unimelb.edu.au
  137. or
  138.    DRmailhost.cs.mu.oz.au
  139.    CRmailhost.cs.mu.oz.au
  140.  
  141.  
  142. #   At the University of Illinois *ONLY*
  143. #
  144. #   # major relay host: use the $M mailer to send mail to other domains
  145. #   DRux1.cso.uiuc.edu
  146. #   CRux1.cso.uiuc.edu
  147. #
  148. #   At the US Army CERL *ONLY*
  149. #
  150. #   # major relay host: use the $M mailer to send mail to other domains
  151. #   DRmax.cecer.army.mil
  152. #   CRmax.cecer.army.mil
  153.  
  154. 8) Configure your domain names.  Replace the foo.bar.uiuc.edu names below
  155.    with your host's FQDN.
  156.  
  157.    #################################################
  158.    #
  159.    #    General configuration information
  160.     ...
  161.    # Example:                (bogus examples, ignore)
  162.    # DmCS.Podunk.EDU
  163.    # Cm cs cs.Podunk.EDU
  164.    Dwfoo.bar.uiuc.edu
  165.    Dmfoo.bar.uiuc.edu
  166.  
  167. [ Dm above is a kludge, to work around the DDN's mailer specific ruleset
  168.     doug recommends:
  169.        Dwfoo.bar.uiuc.edu
  170.        Dmbar.uiuc.edu
  171.   where "foo" is simple hostname and "bar.uiuc.edu" is domain name; then
  172.   change ruleset X to do what is really intended.
  173.  
  174.   as supplied:
  175.  
  176.   S22
  177.   R$*<@LOCAL>$*           $:$1
  178.   R$-<@$->                $:$>3${Z$1@$2$}                 invert aliases
  179.   R$*<@$+.$*>$*           $@$1<@$2.$3>$4                  already ok
  180.   R$+<@$+>$*              $@$1<@$2.$m>$3                  tack on our domain
  181.   R$+                     $@$1<@$m>                       tack on our domain
  182.  
  183.   change the last line to
  184.   R$+                     $@$1<@$j>                       tack on our hostname
  185. ]
  186.  
  187.  
  188.  
  189. 9) Change the ddn mailer rules in ruleset 0 according to the comments there.
  190.    Ruleset 0 is labelled by a line containing only "S0".  About 40 lines
  191.    further down are the following rulesets.
  192.  
  193.    [just search for "DDN"        - doug ]
  194.  
  195.  
  196.    # Pass other valid names up the ladder to our forwarder
  197.    #R$*<@$*.$=T>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@domain.known
  198.  
  199.    # Replace following with above to only forward "known" top-level domains
  200.    #R$*<@$*.$+>$*    $#$M    $@$R $:$1<@$2.$3>$4    user@any.domain
  201.  
  202.    # if you are on the DDN, then comment-out both of the the lines above
  203.    # and use the following instead:
  204.    R$*<@$*.$+>$*    $#ddn $@ $2.$3 $:$1<@$2.$3>$4    user@any.domain
  205.  
  206.    Follow the comments and comment out the second rule that forwards
  207.    only "known" domains and enable the following rule that uses the "ddn"
  208.    mailer.
  209.  
  210. Write the sendmail.cf file back out and leave the editor.  Now test the
  211. changes by using sendmail in test mode.
  212.  
  213. 10) Test address recognition.  Invoke sendmail in address test mode:
  214.  
  215.    /usr/lib/sendmail -bt
  216.  
  217.    Run the following address forms through one at a time.  The leading 0
  218.    is the starting ruleset.  Each address should resolve to "user" using
  219.    the "local" mailer.  Replace "foo" and "bar.uiuc.edu" with the name
  220.    of your host and domain.
  221.  
  222.    0 user
  223.    0 user@foo
  224.    0 user@foo.bar.uiuc.edu
  225.  
  226. 11) Verify out-going addresses are correct.  Use the -v option to Berkeley
  227.    mail to check that the return addresses are correct.  If -v doesn't
  228.    work with your mailer, use sendmail direct.
  229.  
  230.    Mail -v nobody@ucbvax.berkeley.edu < /dev/null
  231.       or
  232.    /usr/lib/sendmail -v nobody@ucbvax.berkeley.edu < /dev/null
  233.  
  234. 12) Fire up sendmail in daemon mode.
  235.  
  236.    /usr/lib/sendmail -bd -q1h
  237.  
  238. 13) Test in-bound mail.  From another host, verify that mail sent to a
  239.    user that has no forwarding set up, either via /etc/aliases or
  240.    .forward file, actually arrives.  Telnet to the SMTP port and verify
  241.    that the greeting message uses the fully qualified domain name.
  242.  
  243.    telnet foo.bar.uiuc.edu 25
  244.  
  245.    quit
  246. -- 
  247. --
  248. stolen words:
  249.     I multitask, therefore we are.    - adrian@internode.com.au
  250.