home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 11 / IOPROG_11.ISO / docs / mail-h~1 < prev    next >
Encoding:
Text File  |  1996-03-13  |  29.8 KB  |  707 lines

  1.   The Linux Electronic Mail HOWTO
  2.   Vince Skahan, <vince@halcyon.com>
  3.   v1.12, 29 November 1995
  4.  
  5.   This document describes the setup and care+feeding of Electronic Mail
  6.   (e-mail) under Linux.  You need to read this if you plan to communi¡
  7.   cate locally or to remote sites via electronic mail.  You probably do
  8.   *not* need to read this document if don't exchange electronic mail
  9.   with other users on your system or with other sites.
  10.  
  11.   1.  Introduction
  12.  
  13.   The intent of this document is to answer some of the questions and
  14.   comments that appear to meet the definition of 'frequently asked
  15.   questions' about e-mail software under Linux.
  16.  
  17.   This document and the corresponding UUCP and News 'HOWTO' documents
  18.   collectively supersede the UUCP-NEWS-MAIL-FAQ that has previously been
  19.   posted to comp.os.linux.announce.
  20.  
  21.   1.1.  New versions of this document
  22.  
  23.   New versions of this document will be periodically posted to
  24.   comp.os.linux.announce, comp.answers, and news.answers.  They will
  25.   also be added to the various anonymous ftp sites who archive such
  26.   information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  27.  
  28.   In addition, you should be generally able to find this document on the
  29.   Linux WorldWideWeb home page at http://sunsite.unc.edu/mdw/linux.html.
  30.  
  31.   1.2.  Feedback
  32.  
  33.   I am interested in any feedback, positive or negative, regarding the
  34.   content of this document via e-mail.  Definitely contact me if you
  35.   find errors or obvious omissions.
  36.  
  37.   I read, but do not necessarily respond to, all e-mail I receive.
  38.   Requests for enhancements will be considered and acted upon based on
  39.   that day's combination of available time, merit of the request, and
  40.   daily blood pressure :-)
  41.  
  42.   Flames will quietly go to /dev/null so don't bother.
  43.  
  44.   In particular, the Linux filesystem standard for pathnames is an
  45.   evolving thing.  What's in this document is there for illustration
  46.   only based on the current standard at the time that part of the
  47.   document was written and in the paths used in the distributions or
  48.   'kits' I've personally seen.  Please consult your particular Linux
  49.   distribution(s) for the paths they use.
  50.  
  51.   Feedback concerning the actual format of the document should go to the
  52.   HOWTO coordinator - Greg Hankins (gregh@sunsite.unc.edu).
  53.  
  54.   1.3.  Copyright Information
  55.  
  56.   The Mail-HOWTO is copyrighted (c)1994 Vince Skahan.
  57.  
  58.   A verbatim copy may be reproduced or distributed in any medium
  59.   physical or electronic without permission of the author.  Translations
  60.   are similarly permitted without express permission if it includes a
  61.   notice on who translated it.
  62.  
  63.   Short quotes may be used without prior consent by the author.
  64.   Derivative work and partial distributions of the Mail-HOWTO must be
  65.   accompanied with either a verbatim copy of this file or a pointer to
  66.   the verbatim copy.
  67.  
  68.   Commercial redistribution is allowed and encouraged; however, the
  69.   author would appreciate being notified of any such distributions (as a
  70.   courtesy).
  71.  
  72.   In short, we wish to promote dissemination of this information through
  73.   as many channels as possible. However, we do wish to retain copyright
  74.   on the HOWTO documents.
  75.  
  76.   We further want that ALL information provided in the HOWTOS is
  77.   disseminated.  If you have questions, please contact Greg Hankins, the
  78.   Linux HOWTO coordinator, at gregh@sunsite.unc.edu.
  79.  
  80.   1.4.  Standard Disclaimer
  81.  
  82.   Of course, I disavow any potential liability for the contents of this
  83.   document.  Use of the concepts, examples, and/or other content of this
  84.   document is entirely at your own risk.
  85.  
  86.   1.5.  Other sources of information
  87.  
  88.   1.5.1.  LINUX HOWTO Documents:
  89.  
  90.   There is plenty of exceptional material provided in the other Linux
  91.   HOWTO documents and from the Linux DOC project.  In particular, you
  92.   might want to take a look at the following:
  93.  
  94.   ╖  the Serial Communications HOWTO
  95.  
  96.   ╖  the Ethernet HOWTO
  97.  
  98.   ╖  the Linux Networking Administrators' Guide
  99.  
  100.   1.5.2.  USENET:
  101.  
  102.              comp.mail.elm           the ELM mail system.
  103.              comp.mail.mh            The Rand Message Handling system.
  104.              comp.mail.mime          Multipurpose Internet Mail Extensions.
  105.              comp.mail.misc          General discussions about computer mail.
  106.              comp.mail.multi-media   Multimedia Mail.
  107.              comp.mail.mush          The Mail User's Shell (MUSH).
  108.              comp.mail.sendmail      the BSD sendmail agent.
  109.              comp.mail.smail         the smail mail agent.
  110.              comp.mail.uucp          Mail in the uucp environment.
  111.  
  112.   1.5.3.  Books
  113.  
  114.   The following is a non-inclusive set of books that will help...
  115.  
  116.   ╖  "Managing UUCP and USENET" from O'Reilly and Associates is in my
  117.      opinion the best book out there for figuring out the programs and
  118.      protocols involved in being a USENET site.
  119.  
  120.   ╖  "Unix Communications" from The Waite Group contains a nice
  121.      description of all the pieces (and more) and how they fit together.
  122.  
  123.   ╖  "Sendmail" from O'Reilly and Associates looks to be the definitive
  124.      reference on sendmail-v8 and sendmail+IDA.  It's a "must have" for
  125.      anybody hoping to make sense out of sendmail without bleeding in
  126.      the process.
  127.  
  128.   ╖  "The Internet Complete Reference" from Osborne is a fine reference
  129.      book that explains the various services available on Internet and
  130.      is a great source for information on news, mail, and various other
  131.      Internet resources.
  132.  
  133.   ╖  "The Linux Networking Administrators' Guide" from Olaf Kirch of the
  134.      Linux DOC Project is available on the net and is also published by
  135.      (at least) O'Reilly and SSC.  It makes a fine one-stop shopping to
  136.      learn about everything you ever imagined you'd need to know about
  137.      Unix networking.
  138.  
  139.      Shameless plug mode ON - the sendmail+IDA descriptions below have
  140.      been very much expanded and more fully explained in Chapter 15 of
  141.      the  Linux Networking Administrators' Guide.  I strongly recommend
  142.      you grab a copy and read it.
  143.  
  144.   1.5.4.  Periodic USENET Postings
  145.  
  146.   Also worth mentioning, is Chris Lewis' periodic posting on unix e-mail
  147.   software, which is available on rtfm.mit.edu in
  148.   /pub/usenet/comp.mail.misc/UNIX_Email_Software_Survey_*
  149.  
  150.   1.6.  Where *NOT* to look for help
  151.  
  152.   There is nothing "special" about configuring and running mail under
  153.   Linux (any more).  Accordingly, you almost certainly do *NOT* want to
  154.   be posting generic mail-related questions to the comp.os.linux.*
  155.   newsgroups.
  156.  
  157.   Unless your posting is truly Linux-specific (ie, "please tell me what
  158.   routers are already compiled into the SLS1.03 version of smail3.1.28")
  159.   you should be asking your questions in one of the newsgroups or
  160.   mailing lists referenced above.
  161.  
  162.   Let me repeat that.
  163.  
  164.   There is virtually no reason to post anything mail-related in the
  165.   comp.os.linux hierarchy any more.  There are existing newsgroups in
  166.   the comp.mail.* hierarchy to handle *ALL* your questions.
  167.  
  168.   IF YOU POST TO COMP.OS.LINUX.* FOR NON-LINUX-SPECIFIC QUESTIONS, YOU
  169.   ARE LOOKING IN THE WRONG PLACE FOR HELP.  THE ELECTRONIC MAIL EXPERTS
  170.   HANG OUT IN THE PLACES INDICATED ABOVE AND GENERALLY DO NOT RUN LINUX.
  171.   POSTING TO THE LINUX HIERARCHY FOR NON-LINUX-SPECIFIC QUESTIONS WASTES
  172.   YOUR TIME AND EVERYBODY ELSE'S...AND IT FREQUENTLY DELAYS YOU FROM
  173.   GETTING THE ANSWER TO YOUR QUESTION.
  174.  
  175.   2.  Hardware Requirements
  176.  
  177.   There are no specific hardware requirements for mail under Linux.
  178.  
  179.   You'll need some sort of 'transport' software to connect to remote
  180.   systems, which means either tcp-ip or uucp.   This could mean that you
  181.   need a modem or ethernet card (depending on your setup).
  182.  
  183.   3.  Getting the software
  184.  
  185.   In general, I grab my sources from ftp.uu.net and the other fine
  186.   archive sites on Internet.  In addition, Linux-specific binary ports
  187.   are found in the usual Linux distrbutions and on the usual Linux
  188.   anonymous ftp sites (sunsite.unc.edu and tsx-11.mit.edu in
  189.   particular).
  190.  
  191.   The newspak-2.5.tar.z distribution contains config files and readme
  192.   files related to building uucp, news, and mail software under Linux
  193.   from the various freely-available sources.  It can usually be found in
  194.   sunsite.unc.edu:/pub/Linux/system/Mail/news.  If you can't find it on
  195.   sunsite, please send me mail and I'll make sure you get a copy of it.
  196.  
  197.   4.  Mail 'Transport Agents'
  198.  
  199.   This section contains information related to 'transport agents', which
  200.   means the underlying software that connects your local system to
  201.   remote systems.
  202.  
  203.   4.1.  Smail v3.1
  204.  
  205.   Smail3.1 seems to be a de-facto standard transport agent for uucp-only
  206.   sites and for some smtp sites.  It compiles without patching from the
  207.   sources.  In addition, smail is provided in binary form in the SLS
  208.   distribution of Linux.
  209.  
  210.   The newspak distribution contains config files for smail3.1.28 under
  211.   Linux that you can use to start with.
  212.  
  213.   If you're building smail from sources, you need to have the following
  214.   in your os/linux file so that 'sed' gives you shell scripts that work
  215.   properly.
  216.  
  217.           CASE_NO_NEWLINES=true
  218.  
  219.   For a uucp-only system that has a MX-record and that wants a
  220.   domainized header (who goes through a smart-host for everything),
  221.   these are the entire config files you'll need:
  222.  
  223.   ╖  replace 'subdomain.domain' with your domain name
  224.  
  225.   ╖  replace 'myhostname' with you un-domainized hostname
  226.  
  227.   ╖  replace 'my_uucp_neighbor' with the uucp name of your upstream site
  228.  
  229.              #-------- /usr/local/lib/smail/config -----------------
  230.              #
  231.              # domains we belong to
  232.              visible_domain=subdomain.domain:uucp
  233.              #
  234.              # who we're known as (fully-qualified-site-name)
  235.              visible_name=myhostname.subdomain.domain
  236.              #
  237.              # who we go through
  238.              smart_path=my_uucp_neighbor
  239.              #
  240.              #---------- /usr/local/lib/smail/paths --------------
  241.              #
  242.              # we're a domainized site, make sure we accept mail to both names
  243.              myhostname        %s
  244.              myhostname.subdomain.domain      %s
  245.              #
  246.              #-------------------------------------------------------------------
  247.  
  248.   To run smail as a smtp daemon, add the following to /etc/inetd.conf:
  249.  
  250.                   smtp stream tcp nowait  root  /usr/bin/smtpd smtpd
  251.  
  252.   Outgoing mail gets sent automatically, when using elm. If your inter¡
  253.   net link is down when you send mail, then the mail sits in
  254.   "/usr/spool/smail/input".  When the link next comes up, "runq" is run
  255.   which causes the mail to be sent.
  256.  
  257.   4.2.  Sendmail+IDA
  258.  
  259.   I run a ppp and uucp site and generally use sendmail5.67b+IDA1.5
  260.   instead of smail3.1.28 due to the incredible ease of use.  There is a
  261.   binary distribution in sunsite.unc.edu:pub/Linux/system/Mail/delivery.
  262.   To install it:
  263.  
  264.   ╖  you'll probably want to remove (or rename) all the files from smail
  265.      (see the /install/installed directory if you are SLS) to be safe.
  266.  
  267.   ╖  cd to / then "gunzip -c sendmail5.67b+IDA1.5.tpz | tar xvf -" If
  268.      you have a "modern" tar from a recent Slackware (for example) you
  269.      can probably just do a "tar -zxvf filename.tgz" and get the same
  270.      results.
  271.  
  272.   ╖  cd to /usr/local/lib/mail/CF and copy the sample.m4 local.m4 file
  273.      to "yourhostname.m4".  Edit out the distributed hostname, aliases,
  274.      and smarthost and put in the correct one for your site.  The
  275.      default file is for a uucp-only site who has domainized headers and
  276.      who talks to a smart host.  Then "make yourhostname.cf" and move
  277.      the resulting file to /etc/sendmail.cf
  278.  
  279.   ╖  if you are uucp-only, you do *NOT* need to create any of the tables
  280.      mentioned in the README.linux file.  You'll just have to touch the
  281.      files so that the Makefile works.  Just edit the .m4 file, make
  282.      sendmail.cf, and start testing it.
  283.  
  284.   ╖  if you're uucp-only and you talk to sites in addition to your
  285.      "smart-host", you'll need to add uucpxtable entries for each (or
  286.      mail to them will also go through the smart host) and run dbm
  287.      against the revised uucpxtable.
  288.  
  289.   ╖  if you use my sendmail5.67b+IDA1.5 distribution you should not use
  290.      a "freeze file".
  291.   ╖  If you run Rich Braun's original binary distribution of 5.67a,
  292.      you'll need to freeze the configuration if you change your .cf file
  293.      with "/usr/lib/sendmail -bz" to make the changes take effect.  You
  294.      should also update your version to at least 5.67b since there is a
  295.      nasty security hole in 5.67a and earlier.
  296.  
  297.   Another nice thing is that if you have mail.debug set and you run
  298.   syslogd, your incoming and outgoing mail messages will get logged.
  299.   See the /etc/syslog.conf file for details.
  300.  
  301.   The sources for sendmail+IDA may be found at vixen.cso.uiuc.edu.  They
  302.   require no patching to run under Linux if you're running something
  303.   like a kernel of 1.00.
  304.  
  305.   If you're running a current kernel of around 1.1.50 or later, you get
  306.   the fun of reversing most of the Linux-specific patches that are now
  307.   in the vanilla sources.  It's extremely obvious where this needs to be
  308.   done.  Just type make and when it blows up, go to that line in the
  309.   sources and comment out the Linux-specific code that's in there.
  310.  
  311.   Sometime after things settle down, I'll send the 'unpatches' to the
  312.   sendmail+IDA authors and ask'em to remove the now unnecessary patches.
  313.  
  314.   If you're going to run sendmail+IDA, I strongly recommend you go to
  315.   the sendmail5.67b+IDA1.5 version since all required Linux-specific
  316.   patches are now in the vanilla sources and several security holes have
  317.   been plugged that WERE (!!!) in the older version you may have grabbed
  318.   or built before about December 1st, 1993.
  319.  
  320.   The May/June 1994 edition of Linux Journal has an extensive article on
  321.   the care and feeding of sendmail+IDA.  The new edition of the Linux
  322.   DOC Project Networking Administrator's Guide has an even more detailed
  323.   and complete version.
  324.  
  325.   4.2.1.  The sendmail.m4 file
  326.  
  327.   Sendmail+IDA requires you to set up a sendmail.m4 file rather than
  328.   editing the sendmail.cffile directly.  The nice thing about this is
  329.   that it is simple to set up mail configurations that are extremely
  330.   difficult (if not totally impossible for most people to set up
  331.   correctly) in smail or traditional sendmail.
  332.  
  333.   The sendmail.m4 file that corresponds to the above smail example looks
  334.   like the following:
  335.  
  336.     dnl #------------------ SAMPLE SENDMAIL.M4 FILE ------------------
  337.     dnl #
  338.     dnl # (the string 'dnl' is the m4 equivalent of commenting out a line)
  339.     dnl #
  340.     dnl # you generally don't want to override LIBDIR from the compiled in paths
  341.     dnl #define(LIBDIR,/usr/local/lib/mail)dnl    # where all support files go
  342.     define(LOCAL_MAILER_DEF, mailers.linux)dnl    # mailer for local delivery
  343.     define(POSTMASTERBOUNCE)dnl                   # postmaster gets bounces
  344.     define(PSEUDODOMAINS, BITNET UUCP)dnl         # don't try DNS on these
  345.     dnl #
  346.     dnl #-------------------------------------------------------------
  347.     dnl #
  348.     dnl # names we're known by
  349.     define(PSEUDONYMS, myhostname.subdomain.domain myhostname.UUCP)
  350.     dnl #
  351.     dnl # our primary name
  352.     define(HOSTNAME, myhostname.subdomain.domain)
  353.     dnl #
  354.     dnl # our uucp name
  355.     define(UUCPNAME, myhostname)dnl
  356.     dnl #
  357.     dnl #-------------------------------------------------------------
  358.     dnl #
  359.     define(UUCPNODES, |uuname|sort|uniq)dnl       # our uucp neighbors
  360.     define(BANGIMPLIESUUCP)dnl                    # make certain that uucp
  361.     define(BANGONLYUUCP)dnl                       #  mail is treated correctly
  362.     define(RELAY_HOST, my_uucp_neighbor)dnl       # our smart relay host
  363.     define(RELAY_MAILER, UUCP-A)dnl               # we reach moria via uucp
  364.     dnl #
  365.     dnl #--------------------------------------------------------------------
  366.     dnl #
  367.     dnl # the various dbm lookup tables
  368.     dnl #
  369.     define(ALIASES, LIBDIR/aliases)dnl            # system aliases
  370.     define(DOMAINTABLE, LIBDIR/domaintable)dnl    # domainize hosts
  371.     define(PATHTABLE, LIBDIR/pathtable)dnl        # paths database
  372.     define(GENERICFROM, LIBDIR/generics)dnl       # generic from addresses
  373.     define(MAILERTABLE, LIBDIR/mailertable)dnl    # mailers per host or domain
  374.     define(UUCPXTABLE, LIBDIR/uucpxtable)dnl      # paths to hosts we feed
  375.     define(UUCPRELAYS, LIBDIR/uucprelays)dnl      # short-circuit paths
  376.     dnl #
  377.     dnl #--------------------------------------------------------------------
  378.     dnl #
  379.     dnl # include the 'real' code that makes it all work
  380.     dnl # (provided with the source code)
  381.     dnl #
  382.     include(Sendmail.mc)dnl                         # REQUIRED ENTRY !!!
  383.     dnl #
  384.     dnl #------------ END OF SAMPLE SENDMAIL.M4 FILE -------
  385.  
  386.   4.2.2.  Defining a local mailer
  387.  
  388.   Unlike most Unix distributions, Linux does not come with a local mail
  389.   delivery agent by default.  I recommend using the commonly available
  390.   deliver program, which is an optional package in a number of the usual
  391.   Linux distributions.  In order to do so, you need to define a
  392.   LOCAL_MAILER_DEF in the sendmail.m4 file that points to a file that
  393.   looks like:
  394.  
  395.     # -- /usr/local/lib/mail/mailers.linux --
  396.     #     (local mailers for use on Linux )
  397.     Mlocal, P=/usr/bin/deliver, F=SlsmFDMP, S=10, R=25/10, A=deliver $u
  398.     Mprog,  P=/bin/sh,       F=lsDFMeuP,   S=10, R=10, A=sh -c $u
  399.  
  400.   There is a also built-in default for deliver in the Sendmail.mc file
  401.   that gets included into the sendmail.cf file.  To specify it, you
  402.   would not use the mailers.linux file but would instead define the
  403.   following in your sendmail.m4 file:
  404.  
  405.      dnl --- (in sendmail.m4) ---
  406.      define(LOCAL_MAILER_DEF, DELIVER)dnl       # mailer for local delivery
  407.  
  408.   Unfortunately, Sendmail.mc assumes deliver is installed in /bin, which
  409.   is not the case with Slackware1.1.1 (which installs it in /usr/bin).
  410.   In that case you'd need to either fake it with a link or rebuild
  411.   deliver from sources so that it resides in /bin.
  412.  
  413.   4.2.3.  The Sendmail+IDA dbm Tables
  414.  
  415.   Setting up special behavior for sites or domains is done through a
  416.   number of optional dbm tables rather than editing the sendmail.cf file
  417.   directly.  Refer to the July-1994 issue of Linux Journal, to the docs
  418.   in the sources, or to the sendmail chapter in the newest version of
  419.   the Linux DOC Project Networking Administration Guide which will be
  420.   available real-soon-now for more details.
  421.  
  422.   ╖  mailertable   - defines special behavior for remote hosts or
  423.      domains.
  424.  
  425.   ╖  uucpxtable    - forces UUCP delivery of mail to hosts that are in
  426.      DNS format.
  427.  
  428.   ╖  pathtable     - defines UUCP bang-paths to remote hosts or domains.
  429.  
  430.   ╖  uucprelays    - short-circuits the pathalias path to well-known
  431.      remote hosts.
  432.  
  433.   ╖  genericfrom   - converts internal addresses into generic ones
  434.      visible to the outside world.
  435.  
  436.   ╖  xaliases      - converts generic addresses to/from valid internal
  437.      ones.
  438.  
  439.   ╖  decnetxtable  - converts RFC-822 addresses to DECnet-style
  440.      addresses.
  441.  
  442.   4.2.4.  So Which Entries are Really Required?
  443.  
  444.   When not using any of the optional dbm tables, sendmail+IDA delivers
  445.   mail via the RELAY_HOST and RELAY_MAILER) defined in the sendmail.m4
  446.   file used to generate sendmail.cf.  It is easily possible to override
  447.   this behavior through entries in the domaintable or uucpxtable.
  448.  
  449.   A generic site that is on Internet and speaks Domain Name Service, or
  450.   one that is UUCP-only and forwards all mail via UUCP through a smart
  451.   RELAY_HOST, probably does not need any specific table entries at all.
  452.  
  453.   Virtually all systems should set the DEFAULT_HOST and PSEUDONYMS
  454.   macros, which define the canonical site name and aliases it is known
  455.   by.  If all you have is a relay host and relay mailer, you don't need
  456.   to set these defaults since it works automagically.
  457.  
  458.   UUCP hosts will probably also need to set UUCPNAME to their official
  459.   UUCP name.  They will also probably set RELAY_MAILER, and RELAY_HOST
  460.   which enable smart-host routing through a mail relay.  The mail
  461.   transport to be used is defined in RELAY_MAILER and should usually be
  462.   UUCP-A for UUCP sites.
  463.  
  464.   If your site is SMTP-only and talks `Domain Name Service', you would
  465.   change the RELAY_MAILER.
  466.  
  467.   If you're a SLIP site, you might want to take the easy way out and
  468.   just forward all outgoing mail to your service provider to do the
  469.   right thing with.  To do so, you'd want to define ISOLATED_DOMAINS and
  470.   VALIDATION_DOMAINS to be your domain, you'd also want to define
  471.   RELAY_HOST to be your service provider and RELAY_MAILER to be TCP. Of
  472.   course, you want to ask permission before you set any system up as
  473.   your general purpose relay.
  474.  
  475.   4.3.  Sendmail 8.7
  476.  
  477.   Sendmail 8.7.x from Berkeley is the latest major revision after
  478.   sendmail5.  It has wonderful built-in support for building under
  479.   Linux.  Just "make linux" and you'll be all set.  You'll probably be
  480.   best served by grabbing one of the various binary distributions off of
  481.   the usual Linux archive sites rather than fighting things like
  482.   Berkeley dbm yourself.
  483.  
  484.   There's a nice distribution of sendmail 8.6.12 from Jason Haar -
  485.   j.haar@lazerjem.demon.co.uk on sunsite.unc.edu in
  486.   /pub/Linux/system/Mail/delivery/sendmail-8.6.12-bin.tgz that has the
  487.   source documentation and a very nice quickie description of how to run
  488.   sendmail v8 for common configurations.
  489.  
  490.   Bottom line with sendmail v8 is that you want to configure the bare
  491.   minimum necessary to get the job done.  The following is an example
  492.   that should get you close at least.
  493.  
  494.   4.3.1.  A Sample 8.7.x mc file
  495.  
  496.   Much like sendmail+IDA, sendmail v8 uses m4 to process a config file
  497.   into a full sendmail.cf that sendmail uses.  The following is my
  498.   current mc file for my site (ppp to Internet for outgoing mail, uucp
  499.   for incoming mail).
  500.  
  501.           dnl divert(-1)
  502.           #---------------------------------------------------------------------
  503.           #
  504.           # this is the .mc file for a linux host that's set up as follows:
  505.           #
  506.           #       - connected to Internet for outbound mail (ppp here)
  507.           #       - connected via UUCP for incoming mail
  508.           #       - domainized headers
  509.           #       - no local mailer (use 'deliver' instead)
  510.           #       - no DNS running so don't canonicalize outgoing via DNS
  511.           #       - all non-local outbound mail goes to the RELAY_HOST over smtp
  512.           #           (we run ppp and let our service provider do the work)
  513.           #
  514.           #                                       vds 3/31/95
  515.           #
  516.           #---------------------------------------------------------------------
  517.           include(`../m4/cf.m4')
  518.           VERSIONID(`linux nodns relays to slip service provider smarthost')dnl
  519.           Cwmyhostname.myprimary.domain myhostname.UUCP localhost
  520.           OSTYPE(linux)
  521.           FEATURE(nodns)dnl
  522.           FEATURE(always_add_domain)dnl
  523.           FEATURE(redirect)
  524.           FEATURE(nocanonify)
  525.           dnl MAILER(local)dnl
  526.           MAILER(smtp)dnl
  527.           MAILER(uucp)dnl
  528.           define(`RELAY_HOST', smtp:my.relay.host.domain)
  529.           define(`SMART_HOST', smtp:my.relay.host.domain)
  530.           define(`UUCP_RELAY', smtp:my.relay.host.domain)
  531.           define(`LOCAL_MAILER_PATH', `/bin/deliver')
  532.           define(`LOCAL_MAILER_ARGS', `deliver $u')
  533.  
  534.   4.3.2.  Sendmail v8 tidbits
  535.  
  536.   There are a few differences I suppose to the 'IDA bigots' among us.
  537.   So far, I've found the following.
  538.  
  539.   ╖  Instead of 'runq', you type 'sendmail -q' to run the queue
  540.  
  541.   4.4.  Other "transport agents"
  542.  
  543.   The following also are known to run under Linux.  Consult "archie" for
  544.   details regarding how to find them...
  545.  
  546.   ╖  smail2.5 - very simple UUCP-based smail
  547.  
  548.   4.5.  Local Delivery Agents
  549.  
  550.   Unlike most operating systems, Linux does not have mail "built-in".
  551.   You'll need a program to deliver the local mail.  One good program is
  552.   Rich Braun's "lmail" program, but I've switched to using the more
  553.   commonly available "deliver" program.
  554.  
  555.   Documentation for how to use either for local delivery is in the
  556.   sendmail5.67b+IDA1.5 binary release (on sunsite) mentioned above.
  557.  
  558.   5.  Mail "User Agents"
  559.  
  560.   This section contains information related to "user agents", which
  561.   means the software the user sees and uses.  This software relies on
  562.   the "transport agents" mentioned above.
  563.  
  564.   5.1.  Elm
  565.  
  566.   Elm compiles, installs, and runs flawlessly under Linux up to and
  567.   through Slackware 1.1.1 (gcc2.4.5, gcclib 4.4.4).  For more
  568.   information, see the elm sources and installation instructions.
  569.  
  570.   The only thing to know is that Elm's Configure script incorrectly sets
  571.   the "ranlib" and "stdarg" variables in config.sh.  The Elm Development
  572.   Team has been informed of this little problem, so please don't bother
  573.   them with it (again).
  574.  
  575.   ╖  (from  Chip Rosenthal - chip@chinacat.unicom.com ) The easiest way
  576.      to deal with this is to create a file called config.over at the top
  577.      of you Elm source tree and include the line:
  578.  
  579.              ranlib='ranlib'
  580.              stdarg='define'
  581.  
  582.   ╖  Elm and filter need to be mode 2755 (group mail) with
  583.      /usr/spool/mail mode 775 and group mail.
  584.  
  585.      If you use a binary distribution, you'll need to create a
  586.      /usr/local/lib/elm/elm.rc file to override the compiled-in hostname
  587.      and domain information:
  588.  
  589.   ╖  replace "subdomain.domain" with your domain name replace
  590.  
  591.   ╖  "myhostname" with you un-domainized hostname replace
  592.  
  593.              #---------- /usr/local/lib/elm/elm.rc ------------------
  594.              #
  595.              # this is the unqualified hostname
  596.              hostname = myhostname
  597.              #
  598.              # this is the local domain
  599.              hostdomain = subdomain.domain
  600.              #
  601.              # this is the fully qualified hostname
  602.              hostfullname = myhostname.subdomain.domain
  603.              #
  604.              #--------------------------------------------------------
  605.  
  606.   One thing you want to be aware of is that if you have Elm compiled to
  607.   be MIME-able, you need metamail installed and in your path or Elm will
  608.   not be able to read MIME mail you've received.  Metamail is available
  609.   on thumper.bellcore.com and of course via "archie".
  610.  
  611.   We have heard reports that gcc and gcclib newer than v2.4.5 and v4.4.4
  612.   respectively are rather strict and fail to compile Elm.  Here's the
  613.   scoop as reported by  ccnp@unitrix.utr.ac.za (Neil Parker)  who
  614.   forwarded a posting by  longyear@netcom.com (Al Longyear).
  615.  
  616.   ╖  ELM is using internal fields in the FILE structure in an effort to
  617.      bypass the standards. (The _flag, _IOERR, and _IOEOF are old fields
  618.      for the pre-POSIX runtime package. While POSIX doesn't say that you
  619.      can't define these fields, it does not say that you _must_. Linux
  620.      does not. It does say that programs should not be written to use
  621.      them, even if they are in the implementation.)
  622.  
  623.               where it does         if (fp->_flag & _IOERR) ...
  624.               change it to          if (ferror(fp)) ....
  625.  
  626.               where it does         if (fp->_flag & _IOEOF) ...
  627.               change it to          if (feof(fp)) ...
  628.  
  629.               These are the ANSI/POSIX definitions for the same function.
  630.  
  631.   ╖  Also, there is a nice set of diffs for Elm 2.4.23 that works just
  632.      fine (for me at least) located on nic.funet.fi in the file
  633.      /pub/OS/Linux/kernel/src/net-source/mail/elm-2.4.24.dif that works
  634.      around some Linux-isms.  While just grabbing the vanilla sources
  635.      and patching with these diffs works fine, I've personally had
  636.      success with just setting up the config.over file mentioned above
  637.      and only patching opt_utils.c and lock.c in the Elm sources. (I run
  638.      kernel 1.3.33 over Slackware 2.1.0)
  639.  
  640.   ╖  In the "too cool to be true" category, there is a distribution of
  641.      Elm-2.4.24 that is "PGP-aware".  To try it, grab the file
  642.      ftp://ftp.viewlogic.com/pub/elm-2.4pl24pgp3.tar.gz, which is
  643.      elm2.4.24 with PGP hooks added.  You configure and build it the
  644.      same way you do normal Elm, which means you probably need to add
  645.      the patches mentioned above.  For what it's worth, I run it here
  646.      and like it a lot.
  647.  
  648.   ╖  While this item is not Linux-specific, it's perceived (wrongly) to
  649.      be a nagging Elm bug nevertheless.  We've heard that Elm sometimes
  650.      fails with a message that it's unable to malloc() some massive
  651.      number of bytes.  The identified workaround is to remove the post-
  652.      processed global mail aliases (aliases.dir and aliases.pag).
  653.  
  654.      THIS IS NOT A BUG IN ELM.  It's an error in configuration of Elm by
  655.      whomever you got your binary distribution of Elm from.  Elm has an
  656.      enhanced, and non-compatible, format for aliases.  You need to
  657.      ensure that the path Elm uses for aliases is different from the
  658.      path sendmail/smail uses.  From the volume of reports of this
  659.      problem, it's apparent that at least one major distribution 'on the
  660.      street' has in the past been misconfigured.  The current Slackware
  661.      does it correctly.
  662.  
  663.   ╖  (from  scot@catzen.gun.de (Scot W. Stevenson) )
  664.  
  665.      The current metamail package requires csh for some of its scripts.
  666.      Failure to have csh (or tcsh) will cause most interesting errors...
  667.  
  668.   5.2.  Mailx
  669.  
  670.   Safe yourself the pain.  Just go and grab the mailx kit from Slackware
  671.   2.1.0 or later, which has a nice implementation of mailx5.5.  If
  672.   you're into building from sources, mailx v5.5 compiles without
  673.   patching under Linux if you have "pmake" installed.
  674.  
  675.   If anybody is still using it, I strongly recommend removing the old
  676.   "edmail" stuff from SLS1.00 and replacing it with mailx.
  677.   5.3.  Other user agents
  678.  
  679.   The following also are known to run under Linux.  Consult "archie" for
  680.   details regarding how to find them...
  681.  
  682.   ╖  Pine      - from the Univ. of Washington
  683.  
  684.   ╖  Metamail  - allows MIME support
  685.  
  686.   ╖  mh      - yet another way to handle mail
  687.  
  688.   ╖  deliver   - file/process mail based on rules
  689.  
  690.   ╖  procmail  - file/process mail based on rules
  691.  
  692.   ╖  Majordomo - manages e-mail lists
  693.  
  694.   ╖  Mserv     - provide files-by-mail
  695.  
  696.   6.  Acknowledgements
  697.  
  698.   The following people have helped in the assembly of the information
  699.   (and experience) that helped make this document possible:
  700.  
  701.   Steve Robbins, Ian Kluft, Rich Braun, Ian Jackson, Syd Weinstein, Ralf
  702.   Sauther, Martin White, Matt Welsh, Ralph Sims, Phil Hughes, Chip
  703.   Rosenthal, Scot Stevenson, Neil Parker
  704.  
  705.   If I forgot anybody, my apologies...
  706.  
  707.