home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / OTHER_FO / SGML / MAIL_HOW.GZ / Mail-HOWTO.sgml
Encoding:
SGML Document  |  1996-02-11  |  29.3 KB  |  719 lines

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