home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / bmw-5 / part01 / README < prev    next >
Text File  |  1994-07-09  |  9KB  |  267 lines

  1. BMW 5.0
  2. COPYRIGHT 1994 CLAY LUTHER
  3.  
  4. THIS SOFTWARE IS FREE.  YOU MAY DISTRIBUTE THIS SOFTWARE AS YOU WANT, BUT
  5. THIS AND ALL OTHER COPYRIGHT NOTICES MUST REMAIN INTACT.
  6. SETTING UP A THE BMW SOFTWARE TO MANAGE LISTS.
  7.  
  8. THIS SOFTWARE MAY BE DISTRIBUTED UNDER THE GNU SOFTWARE LICENSE.
  9.  
  10.  
  11. BMW is written in perl and your system must have perl installed to run it.
  12. Perl was selected because it is fast AND interpreted.  The user can more
  13. easily change the scripts to suit his site than if they were written in a
  14. precompiled language.  So, perl was choosen.
  15.  
  16. Look over the FILES file and make sure that your tarball unpack correctly.
  17.  
  18. There is no Makefile to execute, but you may have to edit the bmw scripts to
  19. correctly point at your perl executable.  Look at the first line of each
  20. script and make sure that the #! path is correct.  For example, on my system
  21. it is #!/usr/bin/perl, but serveral systems install perl in /usr/local/bin;
  22. such a system would change the #! path to #!/usr/local/bin/perl. 
  23.  
  24. BMW relies on sendmail to handle incoming and outgoing messages.  In general,
  25. all the BMW programs accept information on standard input (the mail message).
  26. It is assumed that the mail message is piped in from sendmail.
  27.  
  28. This means that you must be able to add aliases to your sendmail aliases file.
  29. On most systems only the superuser can do this.  If you do not have superuser
  30. permission, you will probably have to get it before you can operate a 
  31. BMW mailing list.
  32.  
  33.  
  34. CREATE THE BMW DIRECTORY
  35.  
  36. Create a directory that is owned by the bmw owner (on my system, I actually
  37. created a user specifically for owning and operating the mailing lists).
  38. I'll call this directory $BMW.  Unpack the bmw scripts into $BMW.
  39.  
  40. You may have permission problems if the $BMW subdirectories are not in the
  41. same group as what sendmail runs under.  On most systems, this is bin.  On
  42. my system, the user bmw is in group bin (same as sendmail).  I've set the
  43. permissions on $BMW and all its subdirectories to 775.  Furthermore, the
  44. edited files under each $BMW/$LIST directory (subscribers, subscribers.d and
  45. log) should be set to 774.
  46.  
  47.  
  48. WHAT ALIASES DO I NEED?
  49.  
  50. The BMW requires 7 aliases per list to operate.   If your mailing list is
  51. named $LIST then these are:
  52.  
  53. $LIST - alias to a pipe to bmwmail; the address that members post messages to
  54. $LIST-mail - alias to an included file, the actual list of subscribers
  55. $LIST-owner - alias to the list's owner
  56. $LIST-request - alias to a pipe to the bmw program for handling server requests
  57. $LIST-log - alias to the log of the mailing list
  58. $LIST-digest - alias to the digest log of the mailing list
  59. $LIST-digest-mail - alias to the included list of digest subscribers
  60.  
  61. Edit your sendmail aliases file, and create the following aliases for your
  62. list:
  63.  
  64. $LIST: "|$BMW/bmwmail $LIST"
  65. $LIST-mail: ":include:$BMW/$LIST/subscribers"
  66. $LIST-owner: <put your address here!>
  67. $LIST-request: "|$BMW/bmw $LIST"
  68. $LIST-digest: "$BMW/$LIST/digest"
  69. $LIST-digest-mail: ":include:$BMW/$LIST/subscribers.d"
  70.  
  71. Save the aliases file and run newaliases.  Check your aliases with
  72. /usr/lib/sendmail -bv -v <one of the aliases goes here!>.
  73.  
  74. NOTE:  Your users should only send messages to $LIST, $LIST-owner, and 
  75. $LIST-request.  The other addresses are used internally by bmw.
  76.  
  77.  
  78. CREATE YOUR $LIST SUBDIRECTORY
  79.  
  80. Create a directory under $BMW named for your $LIST (lower-case).
  81.  
  82.  
  83. EDIT THE BMW SCRIPTS AND FIX BMWCF
  84.  
  85. Edit bmw, bmwmail, digestify, senddigest, and mkarchive.  Search for the
  86. first occurence of BMWCF.  Change the value of BMWCF to point to whereever
  87. you are putting the bmw.cf file.  This should be all you need to change 
  88. in the scripts themselves (well, besides the perl #! path).
  89.  
  90.  
  91. EDIT bmw.cf
  92.  
  93. After putting bmw.cf whereever you want, edit it.  This allows you to set
  94. bmw operating globals to whatever you want.  Examine the bmw script and look
  95. for the initialization of the GLOBALS array.  If there is a value you don't
  96. like here (certainly any the the ...DIR directory globals will need your 
  97. attention), put them in your bmw.cf file.
  98.  
  99. Look at the bmw.cf file that came with the bmw distribution:
  100.  
  101. basedir = /home/bmw
  102. digest = 1
  103. log = 1
  104. debug = 0
  105.  
  106. This sets the BASEDIR value to /home/bmw, tells bmw that there is a digest
  107. form of the mailing list, tells bmw to log requests, and tells bmw not to
  108. print debugging information during execution.
  109.  
  110.  
  111. RUN A TEST
  112.  
  113. The easiest way to run a test is to execute bmw by hand.  Type in the 
  114. following, substituting your list's name for $LIST and your mail address for
  115. $ADDRESS.
  116.  
  117. % bmw $LIST
  118. Subject: ping
  119. From: $ADDRESS
  120.  
  121. who
  122. ^D
  123.  
  124. If bmw prints out an error, try to solve the problem and run the test again.
  125.  
  126. If no error is printed, check your mailbox.  Also, check the mail mailbox of
  127. $LIST-owner.  You should have a response from bmw for the ping and who request.
  128.  
  129. If there is an error message in $LIST-owner's mailbox, try to fix the error
  130. (perhaps a permission error?) and run the test again.
  131.  
  132.  
  133. TEST ALIASES
  134.  
  135. Now comes a bigger test.  Type in the following with appropriate substitutions:
  136.  
  137. % /usr/lib/sendmail -v $LIST-request
  138. Subject: ping
  139. From: $ADDRESS
  140.  
  141. who
  142. sub
  143. uns
  144. dig
  145. und
  146. dir
  147. help
  148. .
  149.  
  150. Watch sendmail execute your message closely; did it error?  If it does at 
  151. this level, it is most likely a permissions problem.  Go check your permissions
  152. on the $LIST directory and its files and try again.
  153.  
  154. Next, check your mailbox.  Confirm that bmw was able to execute all of those
  155. commands.
  156.  
  157. Check the $LIST-owner's mailbox.  Did bmw send you a error messsage?  If so,
  158. see if you can fix it and run the test again.
  159.  
  160. Check the $LIST directory.  If you have bmw logging on, check the log file.
  161. Are the requests in the log file, especially the sub/uns/dig/und requests?
  162.  
  163.  
  164. MAIL A TEST
  165.  
  166. Now, mail a message to $LIST-request using your favorite mail program.  Make
  167. it a sub request.  Wait for the reponse and check the $BMW/$LIST/subsribers
  168. file to make sure you were added.
  169.  
  170. Now, mail a test message to $LIST.   Wait a little while.  Do you get the
  171. message back?  If not, try mailing to the $LIST with
  172.  
  173. % /usr/lib/sendmail -v $LIST
  174. Subject: testing
  175.  
  176. testing
  177. .
  178.  
  179. And see what it says.  Is there an error?  Try to fix the error and repeat
  180. the test.  It will usually be a permissions error.
  181.  
  182.  
  183. If you can subscribe, unsubscribe, and mail messages to the $LIST and get
  184. reponses, you have probably set bmw up correctly!
  185.  
  186.  
  187. SETTING UP THE DIGEST AND LOG
  188.  
  189. If you are running a digest and log of the mailing list (not a bmw log, but
  190. a monthly log for archiving later), there are a few extra steps you must 
  191. take.
  192.  
  193. First, place the aliases to the digest and the log in the subscribers file.
  194. This will allow them to be sent automatically when the mailing list is mailed
  195. to.  Send a test message to the list with /usr/lib/sendmail -v and make sure
  196. that a copy of the message appears in $LIST/monthly and $LIST/digest.  If
  197. the digest file does not appear, try piping a test message by hand through
  198. digestify.  Repair any reported errors.
  199.  
  200.  
  201. Send a DIGEST request to $LIST-request.  Check the $LIST/subscribers.d file -
  202. is your address in there?  If not, check for permission problems and make sure
  203. that your bmw.cf file has "digest = 1" in it.
  204.  
  205. Next, run senddigest:
  206.  
  207. % senddigest $LIST
  208.  
  209. Did you get a copy of the digest?  If so, congratulations!  If not, look
  210. at the errors reported, check your postmaster's mailbox, and check the
  211. list owner's mailbox for errors.
  212.  
  213.  
  214. CHECK MKARCHIVE
  215.  
  216. If you are doing list logging (a monthly file exists in the $LIST directory
  217. after sending a message to the list [$LIST-log is in your subscribers file,
  218. right?]), run mkarchive to make sure that the monthly file can be archived:
  219.  
  220. % mkarchive $LIST
  221.  
  222. If there are errors (did you set your ARCDIR with bmw.cf?), fix them and
  223. repeat the process with another monthly file in place.
  224.  
  225.  
  226. SET UP CRON
  227.  
  228. If everything is working, set up your crontab.  The distribution comes with
  229. an example crontab named kron.  Edit this file to suit your system and
  230. submit it to cron.
  231.  
  232. The crontab should have a senddigest entry, which bundles up and sends out
  233. the $LIST/digest file to the addresses listed in $LIST/subscribers.d.
  234.  
  235. The crontab should have an entry for mkarchive, which moves the $LIST/monthly
  236. file to the $ARCDIR (specified in bmw.cf) and compresses it.
  237.  
  238.  
  239. EDIT YOUR HELP AND MESSAGE FILES
  240.  
  241. Change the $BMW/help and $BMW/message files to suit your site.  You can also
  242. create $LIST/help and $LIST/message files which override the $BMW files when
  243. a that $LIST is mailed to.
  244.  
  245.  
  246. ANNOUNCE YOUR MAILING LIST
  247.  
  248. Tell people about your list and have fun.
  249.  
  250.  
  251. OTHER PROGRAMS - ledit
  252.  
  253. Ledit is a program that allows your edit the subscribers and subscribers.d
  254. file of a list safely (it does some primitive file locking).  It does not
  255. use the bmw.cf file, so you will need to change one value in it, SDIR,
  256. and possibly your EDITOR command, to suit your system.  To edit a list
  257. with ledit:
  258.  
  259. % ledit $LIST
  260.  
  261. to edit the subscribers file, or
  262.  
  263. % ledit -d $LIST
  264.  
  265. to edit the subscribers.d file.
  266.  
  267.