home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / sys5 / r4 / 555 < prev    next >
Encoding:
Internet Message Format  |  1992-11-19  |  3.9 KB

  1. Xref: sparky comp.unix.sys5.r4:555 comp.mail.misc:3742
  2. Newsgroups: comp.unix.sys5.r4,comp.mail.misc
  3. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!cbnewsk!pegasus!hansen
  4. From: hansen@pegasus.att.com (Tony L. Hansen)
  5. Subject: Re: Email header problems on SVR4.
  6. Organization: AT&T
  7. Date: Thu, 19 Nov 1992 17:20:39 GMT
  8. Message-ID: <1992Nov19.172039.1686@cbnewsk.cb.att.com>
  9. Summary: SVR4.2 (destiny) mailer is better
  10. Keywords: SVR4.2, mail
  11. References: <BxvJL6.FIA@chinet.chi.il.us> <1992Nov18.163903.26405@news.acns.nwu.edu> <BxxC7p.C2A@chinet.chi.il.us>
  12. Sender: hansen@cbnewsk.cb.att.com (tony.l.hansen)
  13. Lines: 67
  14.  
  15. < In article <1992Nov18.163903.26405@news.acns.nwu.edu> skrenta@casbah.acns.nwu.edu (Rich Skrenta) writes:
  16. << upas doesn't fork for each rewrite, BTW.  I bet my mailer is done with
  17. << local delivery before smail3 has finished paging in.  Down with
  18. << monolithic megabyte executables with 10 links!  :-)
  19.  
  20. < You don't fork for each rewrite but you have to for each transformation
  21. < that requires an external process, and you have to repeat each of those
  22. < processess until there are no more new addresses produced.
  23.  
  24. << I can add a paths file with one line:
  25. <<
  26. <<    alias    '(?*)@([^@]+)'    'sed -n -e "s/^\2[ \t]*//p" /usr/lib/paths'
  27.  
  28. < Note the fork/exec that will happen here.  And for the equivalent alias
  29. < file lookup, and for lists.  And that you have to loop through this again
  30. < for every expansion that the lists and alias lookups produce. Also, you
  31. < are doing a linear search, where smail knows how to use dbm or sorted
  32. < files, or yellow pages.
  33.  
  34. With SVR4.2 mail, it's possible for all of that to be cut down to a single
  35. fork/exec. For example, the line to invoke the alias processor in SVR4.2
  36. mail looks essentially like this:
  37.  
  38. '.+'  '[^!]+'  'Translate T=1;B=*; R=|mailalias -r -p' '%n'
  39.                           ^^^ ^^^               ^^
  40.                A   B                C
  41.  
  42. The part marked A indicates that all translations are to be considered
  43. complete and should not be passed through this command again. The part
  44. marked B indicates that the command is to be executed with as many arguments
  45. as will fit onto the command line. The part marked C is an argument to the
  46. alias processor that says that it should recursively expand its aliases.
  47.  
  48. And yes, mailalias uses sorted and hashed files whenever possible. And if
  49. mailalias doesn't do what you want, just plop in another alias processing
  50. tool in its place.
  51.  
  52. < With smail, not only can you do all the steps in a single process you can
  53. < configure it to run in daemon mode where sending a message simply writes
  54. < the spool file and a daemon process periodically wakes up to deliver them.
  55. < This can dramatically smooth the load on a busy machine while imposing
  56. < only a minute or two of delay on the worst case deliveries.
  57.  
  58. This would be a useful feature.
  59.  
  60. < (Yes, I know you could invoke programs that do those things as well, but
  61. < it's starting to get complicated).  And when you run smail as a daemon it
  62. < will cache some of it's lookup data instead of reopening the files for
  63. < every message. Also, you can ask for debugging information and get it for
  64. < every step taken.  It's pretty hard to manage that when you've tied
  65. < together a collection of external programs.
  66.  
  67. There's a definite different philosophy involved with both upas and R4 mail.
  68. Yes, everything can be built into a single program. But look what has to be
  69. done in order to change how it works: you can't build on other tools to help
  70. the process. I believe that the latter matches the UNIX philosophy much
  71. better.
  72.  
  73. Yes, you can sometimes get better performance from a monolithic program.
  74. Isn't it better, though, to spend your time tuning the more general program
  75. to handle using its tools more efficiently? That way the performance of the
  76. entire system is improved. The use of external tools then becomes a minor
  77. matter.
  78.  
  79.                     Tony Hansen
  80.                 hansen@pegasus.att.com, tony@attmail.com
  81.                 att!pegasus!hansen, attmail!tony
  82.