home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume34 / mserv / part04 < prev    next >
Text File  |  1993-01-06  |  61KB  |  2,324 lines

  1. Newsgroups: comp.sources.misc
  2. From: jv@squirrel.mh.nl (Johan Vromans)
  3. Subject: v34i095:  mserv - Squirrel Mail Server Software, version 3.1, Part04/06
  4. Message-ID: <1993Jan7.034910.11707@sparky.imd.sterling.com>
  5. X-Md4-Signature: 14efc7190c4ec552c8b196893b9b0c55
  6. Date: Thu, 7 Jan 1993 03:49:10 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jv@squirrel.mh.nl (Johan Vromans)
  10. Posting-number: Volume 34, Issue 95
  11. Archive-name: mserv/part04
  12. Environment: Perl
  13. Supersedes: mserv-3.0: Volume 30, Issue 46-49
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # Contents:  mserv-3.1/ChangeLog mserv-3.1/chkconfig.pl
  20. #   mserv-3.1/dorequest.pl mserv-3.1/pr_parse.pl
  21. # Wrapped by kent@sparky on Wed Jan  6 21:39:47 1993
  22. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  23. echo If this archive is complete, you will see the following message:
  24. echo '          "shar: End of archive 4 (of 6)."'
  25. if test -f 'mserv-3.1/ChangeLog' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'mserv-3.1/ChangeLog'\"
  27. else
  28.   echo shar: Extracting \"'mserv-3.1/ChangeLog'\" \(18184 characters\)
  29.   sed "s/^X//" >'mserv-3.1/ChangeLog' <<'END_OF_FILE'
  30. XTue Jan  5 19:43:53 1993  Johan Vromans  (jv@squirrel)
  31. X
  32. X    * patchlevel.h 1.19:
  33. X    * ms_common.pl 1.38:
  34. X      Bump to V3.01.
  35. X
  36. X    * mservmgr.txt 1.12:
  37. X    * usrguide.txt 1.12:
  38. X    * mservmgr.txt 1.11:
  39. X      Update to V3.01.
  40. X
  41. X    * README 3.11:
  42. X      Replaced.
  43. X
  44. XSat Jan  2 14:21:36 1993  Johan Vromans  (jv@squirrel)
  45. X
  46. X    * usrguide.txt 1.11:
  47. X      Small updates.
  48. X
  49. X    * pr_dowork.pl 3.24:
  50. X      Fix typo in encoding messages.
  51. X
  52. X    * pr_help.pl 1.6:
  53. X      Add support for @black_list and $black_list_warning.
  54. X
  55. X    * process.pl 3.67:
  56. X      Improve subs errmsg and warning (allow multiple lines).
  57. X      Only verify the recipient name in the UUCP/RFC822 headers
  58. X      against the black list.
  59. X      Add support for $black_list_warning.
  60. X
  61. X    * chkconfig.pl 1.32:
  62. X      Provide $black_list_warning so offending users get a warning
  63. X      instead of being rejected.
  64. X
  65. XFri Jan  1 15:19:18 1993  Johan Vromans  (jv@squirrel)
  66. X
  67. X    * usrguide.txt 1.10:
  68. X    * mservmgr.txt 1.10:
  69. X      Update to Y3.01Q.
  70. X
  71. X    * pr_help.pl 1.5:
  72. X    * process.pl 3.66:
  73. X    * ud_sample1.pl 1.3:
  74. X    * ud_sample2.pl 1.3:
  75. X      Redesign the auto-configuring help system.
  76. X
  77. X    * pr_parse.pl 1.7:
  78. X      Use sub warning where appropriate.
  79. X      Add sub check_ftp (from process.pl).
  80. X
  81. X    * process.pl 3.65:
  82. X      Add support for @black_list (subs discard and verify_recipient).
  83. X      Add a real warning routine.
  84. X      Prefix messages with Warning: or Error: .
  85. X      Move sub check_ftp to pr_parse.pl.
  86. X      Clarify $ftp_uucp_only restriction.
  87. X      Add hint for $prefer_uucp case.
  88. X
  89. X    * chkconfig.pl 1.31:
  90. X      Add support for @black_list.
  91. X
  92. X    * ms_common.pl 1.37:
  93. X      Bump to Y3.01Q.
  94. X      Add @black_list consistency check.      
  95. X
  96. X    * patchlevel.h 1.18:
  97. X      Bump to Y3.01Q.
  98. X
  99. XThu Dec 31 15:20:14 1992  Johan Vromans  (jv@squirrel)
  100. X
  101. X    * pr_ftp.pl 1.6:
  102. X      Handle symlinks on FTP servers. Chase them if possible.
  103. X      Do not switch ftp'type that often.
  104. X
  105. X    * process.pl 3.64:
  106. X      Add '-nointeractive' option.
  107. X
  108. XWed Dec 30 14:31:42 1992  Johan Vromans  (jv@squirrel)
  109. X
  110. X    * patchlevel.h 1.17:
  111. X    * ms_common.pl 1.36:
  112. X      Bump to Y3.01P.
  113. X
  114. X    * usrguide.txt 1.9:
  115. X      Add COMPRESS and ENCODING commands.
  116. X      Document FTP restrictions in case of unknown email address.
  117. X
  118. X    * pr_parse.pl 1.6:
  119. X      Move common code of subs command_loop and interactive loop to
  120. X      sub split_and_exec_line. 
  121. X      Add sub cmd_ignore as helper.
  122. X      Inititalize REPLY and RESET to ingore in interactive mode.
  123. X      Add COMPRESS and ENCODE commands.
  124. X
  125. X    * pr_help.pl 1.4:
  126. X      Add ENCODING command help.
  127. X
  128. X    * pr_dowork.pl 3.23:
  129. X      Sort encoding messages on encoding key.
  130. X
  131. X    * pr_dowork.pl 3.22:
  132. X      Make work_loop settings ($limit, $encoding, ...) retain their
  133. X      values between calls.
  134. X      Use $uunote for FTP password if no recipient known (i.e. in
  135. X      interactive use).
  136. X
  137. X    * ftp.pl 1.3:
  138. X      Show password string if user is anonymous.
  139. X
  140. XFri Dec 25 16:22:36 1992  Johan Vromans  (jv@squirrel)
  141. X
  142. X    * do_report.pl 1.13:
  143. X    * report.pl 3.14:
  144. X      Correct formfeeds between reports.
  145. X
  146. XThu Dec 24 17:31:06 1992  Johan Vromans  (jv@squirrel)
  147. X
  148. X    * patchlevel.h 1.16:
  149. X    * ms_common.pl 1.35:
  150. X      Bump to Y3.01O.
  151. X
  152. X    * usrguide.txt 1.8:
  153. X    * mservmgr.txt 1.9:
  154. X      Update to Y3.01O.
  155. X
  156. X    * pr_dowork.pl 3.21:
  157. X    * chkconfig.pl 1.30:
  158. X    * ms_common.pl 1.34:
  159. X      Add auto-packing.
  160. X      A request for 'file.XXX' will be turned into a packed
  161. X      request for directory 'file'. XXX must be 'zoo', 'zip', 'tar' or
  162. X      'tar.Z'.
  163. X
  164. X    * ms_common.pl 1.33:
  165. X    * pr_dowork.pl 3.20:
  166. X    * chkconfig.pl 1.29:
  167. X      Add auto-compression.
  168. X      A request for 'file.Z' may be turned into 'file' (with
  169. X      compression by 'dorequest') if $auto_compress is set in the
  170. X      config file. 
  171. X
  172. X    * process.pl 3.63:
  173. X    * pr_parse.pl 1.5:
  174. X      Adapt more commands to interactive use.
  175. X
  176. XWed Dec 23 22:52:47 1992  Johan Vromans  (jv@squirrel)
  177. X
  178. X    * process.pl 3.62:
  179. X      Start dorequest only if the queue is not empty.
  180. X
  181. X    * process.pl 3.61:
  182. X      Add (undocumented) -i0 option to be called from inetd.
  183. X
  184. X    * report.pl 3.13:
  185. X    * mlistener.pl 1.7:
  186. X    * makeindex.pl 1.11:
  187. X    * dorequest.pl 3.28:
  188. X    * do_report.pl 1.12:
  189. X    * chkconfig.pl 1.28:
  190. X      Require ms_common.pl before &usage to supply defaults.
  191. X
  192. X    * patchlevel.h 1.15:
  193. X    * ms_common.pl 1.32:
  194. X      Bump to Y3.01N.
  195. X
  196. X    * usrguide.txt 1.7:
  197. X    * mservmgr.txt 1.8:
  198. X    * README 3.10:
  199. X    * MANIFEST 1.15:
  200. X    * MANIFEST 1.14:
  201. X    * pr_doindex.pl 3.4:
  202. X    * pr_dowork.pl 3.19:
  203. X    * pr_parse.pl 1.4:
  204. X    * process.pl 3.60:
  205. X    * process.pl 3.59:
  206. X      Implement interactive mode.
  207. X
  208. XSat Dec 19 00:15:16 1992  Johan Vromans  (jv@squirrel)
  209. X
  210. X    * mservmgr.txt 1.7:
  211. X      Update to Y3.01M.
  212. X
  213. X    * MANIFEST 1.13:
  214. X      Add ud_sample?.pl files.
  215. X      Remove userdefs.pl.
  216. X
  217. X    * README 3.9:
  218. X      Small updates.
  219. X
  220. X    * ud_sample1.pl 1.2 (new file):
  221. X      Sample userdefs: REPORT command.
  222. X
  223. X    * ud_sample2.pl 1.2 (new file):
  224. X        Sample userdefs: SEND CONFIG command.
  225. X
  226. X    * patchlevel.h 1.14:
  227. X    * ms_common.pl 1.31:
  228. X      Bump to Y3.01M.
  229. X
  230. X    * pr_dowork.pl 3.18:
  231. X      Prevent empty 'coding' messages.
  232. X
  233. X    * mservmgr.txt 1.6:
  234. X      Document extending the command set.
  235. X
  236. X    * chkconfig.pl 1.27:
  237. X    * pr_ftp.pl 1.5:
  238. X      Prevent muliple inclusion of 'ftp.pl'.      
  239. X
  240. XFri Dec 18 12:55:17 1992  Johan Vromans  (jv@squirrel)
  241. X
  242. X    * chkconfig.pl 1.26:
  243. X    * ms_config.pl:
  244. X      Add $cmd_extend.
  245. X
  246. X    * pr_dowork.pl 3.17:
  247. X      Make work queue execution table driven.
  248. X
  249. X    * MANIFEST 1.12:
  250. X      Add userdefs.pl, pr_parse.pl.
  251. X
  252. X    * pr_help.pl 1.3:
  253. X      Add support for user defined help.
  254. X
  255. X    * process.pl 3.58:
  256. X      Moved command loop to pr_parse.pl.
  257. X
  258. X    * pr_parse.pl 1.3:
  259. X    * pr_parse.pl 1.2 (new file):
  260. X      Implements the command_loop and command parsing.
  261. X      The command loop is now table driven.
  262. X
  263. X    * userdefs.pl 1.3:
  264. X    * userdefs.pl 1.2 (new file):
  265. X      Sample user definition file.
  266. X
  267. X    * do_report.pl 1.11:
  268. X      Correct unlinking algorithm.
  269. X      Allow ftp scan independent of reports.
  270. X      Add -ftpkeep options to override config value.
  271. X
  272. XTue Dec 15 23:17:20 1992  Johan Vromans  (jv@squirrel)
  273. X
  274. X    * usrguide.txt 1.6:
  275. X    * mservmgr.txt 1.5:
  276. X      Update to Y3.01L.
  277. X
  278. X    * patchlevel.h 1.13:
  279. X      Bump to Y3.01L.
  280. X
  281. X    * pr_dowork.pl 3.16:
  282. X      Reduce formats to one single format for both email and uucp.
  283. X      Be very friendly with the feedback on encodings.
  284. X
  285. X    * process.pl 3.57:
  286. X      Move formats for request reports to pr_dowork.pl.
  287. X
  288. X    * dr_uucp.pl 3.7:
  289. X      Use &canon_fname to construct the UUCP file name.
  290. X
  291. X    * pr_ftp.pl 1.4:
  292. X      Move sub ftp_archname to ms_common.pl.
  293. X
  294. X    * ms_common.pl 1.30:
  295. X    * ms_common.pl 1.29:
  296. X      Bump to Y3.01L.
  297. X      Add sub canon_fname (new) and ftp_archname (from pr_ftp.pl).
  298. X
  299. XSun Dec 13 21:04:19 1992  Johan Vromans  (jv@squirrel)
  300. X
  301. X    * MANIFEST 1.11:
  302. X      Add pr_help.pl.
  303. X
  304. X    * pr_help.pl 1.2:
  305. X    * process.pl 3.56:
  306. X      Move sub help to pr_help.pl.
  307. X
  308. X    * pr_dowork.pl 3.15:
  309. X    * usrguide.txt 1.5:
  310. X      Add enhanced 'encoding' message.
  311. X
  312. X    * usrguide.txt 1.4:
  313. X    * mservmgr.txt 1.4:
  314. X      Misc.
  315. X
  316. X    * CRONTAB.sample 1.3:
  317. X      Add -ftp -ftpclean
  318. X
  319. X    * chkconfig.pl 1.25:
  320. X      Add ARCHIE command.
  321. X
  322. XSat Dec 12 00:13:13 1992  Johan Vromans  (jv@squirrel)
  323. X
  324. X    * process.pl 3.55:
  325. X      Catch STDERR on output.
  326. X      Move sub enqueue to pr_dowork.pl.
  327. X      Move sub fttemp to ms_common.pl.
  328. X      Add ARCHIE command.
  329. X
  330. X    * pr_dowork.pl 3.14:
  331. X      Add ARCHIE command.
  332. X      Move sub enqueue from process.pl.
  333. X      Support automatic compression.
  334. X      Adapt to new queue file format (tab separated, same arguments
  335. X      for mail and uucp).
  336. X
  337. X    * dr_pack.pl 3.3:
  338. X    * dr_mail.pl 3.5:
  339. X    * dr_uucp.pl 3.6:
  340. X    * dorequest.pl 3.27:
  341. X    * dorequest.pl 3.25:
  342. X    * dorequest.pl 3.26:
  343. X      Support automatic compression.
  344. X      Adapt to new queue file format.
  345. X
  346. X    * unpack.pl 2.5:
  347. X      Add support for compressed encoding.
  348. X
  349. X    * patchlevel.h 1.12:
  350. X    * ms_common.pl 1.28:
  351. X      Bump to Y3.01K.
  352. X      Add fttemp routine from process.pl
  353. X
  354. X    * report.pl 3.12:
  355. X      Allow blanks in package entries in logfile.
  356. X
  357. XThu Dec 10 15:41:48 1992  Johan Vromans  (jv@largo)
  358. X
  359. X    * pr_ftp.pl 1.3:
  360. X      Add support for VMS filenames.
  361. X      (Not directory info...
  362. X
  363. X    * mservmgr.txt 1.2:
  364. X      New install guide. Rewritten, enhanced....
  365. X
  366. X    * chkconfig.pl 1.24:
  367. X      Add -current to force using the current directory instead of
  368. X      LIBDIR. 
  369. X
  370. XSun Dec  6 16:04:09 1992  Johan Vromans  (jv@squirrel)
  371. X
  372. X    * usrguide.txt 1.2:
  373. X      New user guide. Rewritten, enhanced....
  374. X
  375. X    * ftp.pl 1.2:
  376. X      Require 'sys/socket.ph' instead of 'socket.ph'.
  377. X
  378. XSat Dec  5 01:29:11 1992  Johan Vromans  (jv@squirrel)
  379. X
  380. X    * ================ Released Y3.01J ================
  381. X
  382. X    * do_report.pl 1.10:
  383. X      Add report/cleanup FTP cache.
  384. X
  385. X    * process.pl 3.54:
  386. X      Allow continuation lines.
  387. X      Remove CD command (too dangerous).
  388. X      Add FTP info in HELP.
  389. X
  390. X    * HELP 3.12:
  391. X      Add documentation on FTP commands.
  392. X
  393. X    * chkconfig.pl 1.23:
  394. X      Add $ftp_keep.
  395. X
  396. X    * ms_config.pl:
  397. X      Add more documentation.
  398. X      Add $ftp_keep.
  399. X
  400. X    * ms_common.pl 1.27:
  401. X    * patchlevel.h 1.11:
  402. X      Bump to Y3.01J.
  403. X
  404. X    * chkconfig.pl 1.22:
  405. X      Check FTP cache.
  406. X
  407. X    * pr_dowork.pl 3.13:
  408. X    * pr_dowork.pl 3.12:
  409. X      Moved most of the FTP stuff to pr_ftp.pl.
  410. X      Implemented FTP file cacheing.
  411. X      FTP DIR is now subject to $dirlimit. Small dirs are included
  412. X      in the feedback.
  413. X      Combined &ftbatch and &ftqueue.
  414. X
  415. X    * README 3.8:
  416. X    * MANIFEST 1.10:
  417. X      Add pr_ftp.pl, dateconv.pl.
  418. X
  419. X    * pr_ftp.pl 1.2:
  420. X      New module. Contains most of the FTP stuff.
  421. X
  422. X    * dateconv.pl 1.2:
  423. X      Borrowed from Lee McLoughlin's 'mirror' package.
  424. X
  425. X    * dorequest.pl 3.24:
  426. X    * ms_common.pl 1.26:
  427. X      Move writelog routine from dorequest.pl to ms_common.pl.
  428. X
  429. XFri Dec  4 00:02:22 1992  Johan Vromans  (jv@squirrel)
  430. X
  431. X    * pr_dowork.pl 3.11:
  432. X      Correct FTP command execution messages.
  433. X
  434. X    * process.pl 3.53:
  435. X      Allow empty 'dir' if FTP connection is open.
  436. X      Allow 'host.uucp' (strip .uucp)
  437. X
  438. X    * ================ Released Y3.01I ================
  439. X
  440. X    * MANIFEST 1.10:
  441. X    * README 3.7:
  442. X    * chkconfig.pl 1.21:
  443. X    * ms_config.pl:
  444. X      Add new FTP support.
  445. X
  446. X    * chat2.pl, ftp.pl:
  447. X      Borrowed from Lee McLoughlin's 'mirror' package.
  448. X
  449. XThu Dec  3 23:51:05 1992  Johan Vromans  (jv@squirrel)
  450. X
  451. X    * pr_dowork.pl 3.10:
  452. X      Use ftp/chat2 package to handle FTP directly.
  453. X      This gives us more control.
  454. X
  455. X    * process.pl 3.52:
  456. X      If archive item foo exists 'as is' as well as with known
  457. X      extensions, and the user requests 'foo', then do not return an
  458. X      ambigous request.
  459. X
  460. XSat Nov 28 17:47:50 1992  Johan Vromans  (jv@squirrel)
  461. X
  462. X    * process.pl:
  463. X      More places where /to/ was used instead of /^to$/.
  464. X      Leave "mserv.last" in $tmpdir.
  465. X
  466. XSun Nov  8 14:15:50 1992  Johan Vromans  (jv@squirrel)
  467. X
  468. X    * dorequest.pl 3.23:
  469. X      Correct options, add nolog and nouucp.
  470. X
  471. X    * dr_uucp.pl 3.5:
  472. X      Implement $opt_nouucp.
  473. X
  474. XSat Nov  7 14:01:15 1992  Johan Vromans  (jv@squirrel)
  475. X
  476. X    * process.pl 3.51:
  477. X    * process.pl 3.50:
  478. X      Implement mail header tracing.
  479. X
  480. X    * dorequest.pl 3.22:
  481. X    * chkconfig.pl 1.20:
  482. X      Implement $nice.
  483. X
  484. X    * process.pl 3.49:
  485. X      Implement $nice.
  486. X      Alow more room for large resend parts lists.
  487. X
  488. XMon Oct 26 10:08:14 1992  Johan Vromans  (jv at pronto)
  489. X
  490. X    * process.pl 3.48:
  491. X      Correct feedback on UUCP headers. The're not always bogus, just
  492. X      unusable... 
  493. X
  494. X    * report.pl 3.11:
  495. X      Was too picky on selecting the first part of a multi-part
  496. X      transfer. It left out UUCP transfers too...
  497. X
  498. X    * chkconfig.pl 1.19:
  499. X      Note that MSERVLIB need not to be set.
  500. X      Note that defining $pdtar overrides $tar.
  501. X
  502. X    * patchlevel.h 1.10:
  503. X    * ms_common.pl 1.25:
  504. X      Bump to Y3.01I.
  505. X
  506. XFri Oct 23 13:28:17 1992  Johan Vromans  (jv at pronto)
  507. X
  508. X
  509. X    * ================ Released Y3.01H ================
  510. X
  511. X    * process.pl 3.47:
  512. X      Allow VMS-style filnames.
  513. X      Check $ftp on implicit FTP commands.
  514. X
  515. X    * pr_dowork.pl 3.9:
  516. X    * pr_dowork.pl 3.8:
  517. X      Allow VMS-style filenames.
  518. X      Protect argument of $dircmd with ''.
  519. X      Eliminate some un-necessary joins.
  520. X
  521. X    * ms_common.pl 1.24:
  522. X      Allow VMS-style filnames.
  523. X      Bump to Y3.01H.
  524. X
  525. X    * patchlevel.h 1.9:
  526. X      Bump to Y3.01H.
  527. X
  528. XThu Oct 22 13:46:08 1992  Johan Vromans  (jv at pronto)
  529. X
  530. X    * ================ Released Y3.01G ================
  531. X
  532. X    * patchlevel.h 1.8:
  533. X    * ms_common.pl 1.23:
  534. X      Bump to Y3.01G.
  535. X
  536. X    * dr_uucp.pl 3.4:
  537. X      Make sure partXXofYY is always sortable.
  538. X
  539. X    * pr_dowork.pl 3.7:
  540. X      Correct $limit and $size handling and notification.
  541. X
  542. XWed Oct 21 00:23:29 1992  Johan Vromans  (jv@squirrel)
  543. X
  544. X    * ================ Released Y3.01F ================
  545. X
  546. X    * dr_mail.pl 3.4:
  547. X      Supply request name in the Subject: instead of the file name.
  548. X
  549. X    * do_report.pl 1.9:
  550. X      Correct argument passing to report.pl.
  551. X
  552. X    * pr_dowork.pl 3.6:
  553. X      Do not remap normal commands to FTP commands anymore.
  554. X      Be more specific with the name of requests.
  555. X      Enhance feedback.
  556. X      Denote limit with 'K' in feedback.
  557. X
  558. X    * process.pl 3.46:
  559. X      Correct processing UUCP headers. Check for valid UUCP host name.
  560. X      Only use it iff very reliable.
  561. X      Allow implicit FTP with single command scope. Aplies to SEND,
  562. X      RESEND and DIR.
  563. X      Set defaults before DIR. Can lead to transfer!
  564. X      Normalize use of $ftphost.
  565. X      Use global exit to COMMAND_LOOP where appropriate.
  566. X      Be liberate in putting FTP OPEN commands in the workQ.
  567. X      Prevent global @_ to be used by uucp_defaults when called from
  568. X      setdefaults. 
  569. X      Allow unknown UUCP hosts if debugging.
  570. X      Don't test known UUCP host name.
  571. X
  572. X    * patchlevel.h 1.7:
  573. X    * ms_common.pl 1.22:
  574. X      Bump to Y3.01F.
  575. X
  576. X    * do_report.pl 1.9:
  577. X      Correct arguments and destination handling.
  578. X
  579. X    * dr_uucp.pl 3.3:
  580. X      Typo.
  581. X
  582. XTue Oct 20 23:15:04 1992  Johan Vromans  (jv@squirrel)
  583. X
  584. X    * ================ Released Y3.01E ================
  585. X
  586. X    * ms_common.pl 1.21:
  587. X    * patchlevel.h 1.6:
  588. X      Bump to Y3.01E.
  589. X
  590. X    * process.pl 3.45:
  591. X      Strip own system name from uucp address.
  592. X
  593. X    * chkconfig.pl 1.18:
  594. X      Add $prefer_uucp configuration variable.
  595. X
  596. X    * pr_dowork.pl 3.5:
  597. X      Record encoding type with the requests in the ftp queue.
  598. X      Do not close/open ftp host if already connected.
  599. X
  600. X    * process.pl 3.44:
  601. X      Continued.
  602. X      Add $prefer_uucp configuration variable.
  603. X
  604. XSun Oct 18 19:22:12 1992  Johan Vromans  (jv@squirrel)
  605. X
  606. X    * process.pl 3.43:
  607. X    * process.pl 3.42:
  608. X      More on FTP.
  609. X      Correct $ftp_uucp_only requirement.
  610. X      Do not split command line on ':' unless there's whitespace also.
  611. X      Allow implicit FTP when send/resend items contain a "host:"
  612. X      prefix.
  613. X      Allow "FTP host" command.
  614. X      Suppress help when TESTing.
  615. X      Add CD as an alias to CWD.
  616. X
  617. X    * pr_dowork.pl 3.4:
  618. X      More on the FTP handling.
  619. X
  620. X    * chkconfig.pl 1.17:
  621. X      Check $ftp and $dircmd.
  622. X
  623. X    * process.pl 3.41:
  624. X      Remove sub fnsplit.
  625. X      Implement DIR command.
  626. X      Implement basic FTP command.
  627. X      Add sub fttemp to generate temp file names.
  628. X
  629. X    * pr_dowork.pl 3.3:
  630. X      Add documentation on the work queue contents.
  631. X      Add possibility to gather output to temp files, and enqueue
  632. X      these for transfer.
  633. X      Implement DIR command.
  634. X      Implement basic FTP command.
  635. X
  636. X    * dr_uucp.pl 3.2:
  637. X    * dr_mail.pl 3.3:
  638. X      Add $remove_file support.
  639. X
  640. X    * dorequest.pl 3.21:
  641. X      Add $remove_file support.
  642. X      Move sub fnsplit to ms_common.pl.
  643. X
  644. X    * HELP 3.11:
  645. X      Document DIR command.
  646. X
  647. X    * ms_common.pl 1.20:
  648. X      Bump to Y3.01D.
  649. X      Add sub fnsplit (from dorequest.pl).
  650. X
  651. X    * patchlevel.h 1.5:
  652. X      Bump to Y3.01D.
  653. X
  654. XSat Oct 17 16:06:16 1992  Johan Vromans  (jv@squirrel)
  655. X
  656. X    * ================ Released Y3.01C ================
  657. X
  658. X    * ms_common.pl 1.19:
  659. X    * patchlevel.h 1.4:
  660. X      Bump to Y3.01C.
  661. X
  662. X    * HELP 3.10:
  663. X    * INSTALL 3.17:
  664. X    * README 3.6:
  665. X    * ms_common.pl 1.18:
  666. X    * chkconfig.pl 1.16:
  667. X      Allow mail server to be uucp only.
  668. X
  669. X    * process.pl 3.40:
  670. X      Extract uucp defaults from From_ header.
  671. X      Allow mail server to be uucp only.
  672. X      Streamline email / uucp setting code.
  673. X      Allow defaults in UUCP command.
  674. X
  675. X    * process.pl 3.39:
  676. X    * dorequest.pl 3.20:
  677. X    * mlistener.pl 1.6:
  678. X    * do_report.pl 1.8:
  679. X    * chkconfig.pl 1.15:
  680. X    * report.pl 3.10:
  681. X      Correct handling of -config.
  682. X
  683. X    * makeindex.pl 1.10:
  684. X      Add handling of prune dirs.
  685. X
  686. X    * report.pl 3.9:
  687. X      Allow multi-char transfer types (e.g. MP, UP).
  688. X      Better restriction to first part of a transfer only.
  689. X      Correct variable clash (localize variables in report routines).
  690. X      Add totals per month.
  691. X
  692. XWed Oct 14 20:58:07 1992  Johan Vromans  (jv@pasta)
  693. X
  694. X    * dr_pack.pl 3.2:
  695. X      Correct 'zip' calling options.
  696. X
  697. XWed Sep 16 21:11:38 1992  Johan Vromans  (jv@pasta)
  698. X
  699. X    * ================ Released Y3.01B ================
  700. X
  701. X    * process.pl 3.38:
  702. X      Oops. A PATH that contained the string "to" failed...
  703. X
  704. XMon Sep 14 20:59:51 1992  Johan Vromans  (jv@pasta)
  705. X
  706. X    * INSTALL 3.16:
  707. X      Add -config option.
  708. X      Document how to use it.      
  709. X
  710. X    * mlistener.pl 1.5:
  711. X      Add -config option.
  712. X      Have listener pass command line args to process.
  713. X
  714. X    * chkconfig.pl 1.14:
  715. X    * do_report.pl 1.7:
  716. X    * report.pl 3.8:
  717. X    * makeindex.pl 1.9:
  718. X    * process.pl 3.37:
  719. X    * dorequest.pl 3.19:
  720. X    * process.pl 3.36:
  721. X      Add -config option to select an alternate config file from
  722. X      the command line.
  723. X
  724. X    * ms_common.pl 1.17:
  725. X      Require $config_file || "ms_config.pl".
  726. X
  727. X    * ms_common.pl 1.16:
  728. X    * patchlevel.h 1.3:
  729. X      Bump to Y3.01B.
  730. X
  731. XSat Sep 12 21:38:02 1992  Johan Vromans  (jv@pasta)
  732. X
  733. X    * ================ Released Y3.01A ================
  734. X
  735. X    * pr_isearch.pl 3.3:
  736. X      Add $ENV{LOCATE_PATH} for GNU find 3.7.
  737. X
  738. X    * pr_doindex.pl 3.3:
  739. X      Add $ENV{LOCATE_PATH} for GNU find 3.7.
  740. X      Lower maxindexlines upon exceeding the limit.
  741. X
  742. X    * process.pl 3.35:
  743. X      Prevent the first part of the feedback message to be suppressed
  744. X      if BEGIN commands were issued.
  745. X      Clarify feedback on PACK command.
  746. X
  747. XMon Aug 24 22:16:55 1992  Johan Vromans  (jv@pasta)
  748. X
  749. X    * pr_dowork.pl 3.2:
  750. X      Correct typos in english texts.
  751. X
  752. XMon Aug 17 15:47:51 1992  Johan Vromans  (jv@pasta)
  753. X
  754. X    * mserv.notes 1.4:
  755. X      Update message.
  756. X
  757. X    * mlistener.pl 1.4:
  758. X      Change mserv_common.pl -> ms_common.pl.
  759. X
  760. X    * patchlevel.h 1.2:
  761. X    * ms_common.pl 1.15:
  762. X      Bump to Y3.01A.
  763. X
  764. XSun Jul 19 13:36:04 1992  Johan Vromans  (jv@pasta)
  765. X
  766. X    * ================ Released Y3.01 ================
  767. X
  768. X    * chkconfig.pl 1.13:
  769. X      Require patchlevel.h.
  770. X      Verify match between version numbers in ms_common.pl and
  771. X      patchlevel.h. 
  772. X
  773. X    * README 3.5:
  774. X    * INSTALL 3.15:
  775. X    * MANIFEST 1.9:
  776. X      Change mserv_common.pl -> ms_common.pl.
  777. X      Change mserv_config.pl -> ms_config.pl.
  778. X      Add patchlevel.h.
  779. X
  780. X    * patchlevel.h 1.1:
  781. X      New file.
  782. X
  783. X    * chkconfig.pl 1.12:
  784. X    * do_report.pl 1.6:
  785. X    * dorequest.pl 3.18:
  786. X    * listener.pl 1.3:
  787. X    * makeindex.pl 1.8:
  788. X    * process.pl 3.34:
  789. X    * report.pl 3.7:
  790. X    * testlock.pl 1.2:
  791. X      Change mserv_common.pl -> ms_common.pl.
  792. X
  793. X    * ms_common.pl 1.14:
  794. X      Formerly mserv_common.pl.
  795. X      Change mserv_config.pl -> ms_config.pl.
  796. X      Bump to Y3.01.
  797. X
  798. X    * ms_config.pl
  799. X      Formerly mserv_config.pl.
  800. X
  801. X    * process.pl 3.33:
  802. X      Disallow garbage after BEGIN command.
  803. X      Ignore garbage after END command.
  804. X      Make REQUEST END identical to END.
  805. X
  806. X    * dr_mail.pl 3.2:
  807. X      Prepend leading zeroes to part numbers to keep them sortable.
  808. X
  809. XWed Jun 10 11:57:44 1992  Johan Vromans  (jv at largo)
  810. X
  811. X    * ================ Released V3.00 ================
  812. X
  813. END_OF_FILE
  814.   if test 18184 -ne `wc -c <'mserv-3.1/ChangeLog'`; then
  815.     echo shar: \"'mserv-3.1/ChangeLog'\" unpacked with wrong size!
  816.   fi
  817.   # end of 'mserv-3.1/ChangeLog'
  818. fi
  819. if test -f 'mserv-3.1/chkconfig.pl' -a "${1}" != "-c" ; then 
  820.   echo shar: Will not clobber existing file \"'mserv-3.1/chkconfig.pl'\"
  821. else
  822.   echo shar: Extracting \"'mserv-3.1/chkconfig.pl'\" \(11186 characters\)
  823.   sed "s/^X//" >'mserv-3.1/chkconfig.pl' <<'END_OF_FILE'
  824. X#!/usr/local/bin/perl
  825. X# chkconfig.pl -- check mserv configuration
  826. X# SCCS Status     : @(#)@ chkconfig    1.32
  827. X# Author          : Johan Vromans
  828. X# Created On      : Mon Apr 27 21:47:41 1992
  829. X# Last Modified By: Johan Vromans
  830. X# Last Modified On: Sat Jan  2 14:21:33 1993
  831. X# Update Count    : 146
  832. X# Status          : Development
  833. X
  834. X# DISCLAIMER: This prograim aids in finding configuration values
  835. X# and potential problems. No guarantees, however.
  836. X
  837. X$my_name = "chkconfig";
  838. X$my_version = "1.32";
  839. X#
  840. X################ Common stuff ################
  841. X
  842. X$libdir = $ENV{"MSERVLIB"} || "/usr/local/lib/mserv";
  843. Xunshift (@INC, $libdir);
  844. X&options if @ARGV > 0 && $ARGV[0] =~ /^-+[^-]+/;
  845. X@ARGV = ("-") unless @ARGV > 0;
  846. Xif ( $opt_current) {
  847. X    chop ($libdir = `pwd`);
  848. X    $INC[0] = $libdir;
  849. X}
  850. Xrequire "ms_common.pl";
  851. Xrequire "patchlevel.h";
  852. X
  853. Xprint ($my_package, " [", $my_name, " ", $my_version, "]\n");
  854. X
  855. X################ Main ################
  856. X
  857. X# Verify version.
  858. Xlocal ($version) = $my_package =~ /([XYV]\d+\.\d+[A-Z]*)$/;
  859. X
  860. Xif ( $ms_version ne $version ) {
  861. X    print ("FATAL: Version mismatch\n",
  862. X       '  patchlevel.h ', $ms_version, ' <-> ',
  863. X       $version, ' ms_common.pl', "\n");
  864. X    die ("Aborted.\n");
  865. X}
  866. X       
  867. Xprint ("MSERVLIB = ", $ENV{"MSERVLIB"} || "(not set, but that's OK)", "\n");
  868. Xprint ("Program library: ", $libdir, " ", &fstat($libdir,1,1), "\n");
  869. Xprint ("\n");
  870. X
  871. Xif ( defined $mserv_owner && $mserv_owner ) {
  872. X    if ( @u = getpwnam ($mserv_owner) ) {
  873. X    print ("Server owner: ", $mserv_owner, ", uid = $u[2], gid = $u[3]",
  874. X           ", \"", $u[6], "\"\n");
  875. X    }
  876. X    else {
  877. X    print ("Server owner: ", $mserv_owner, " *** Unknown ***\n");
  878. X    }
  879. X}
  880. Xelse {
  881. X    die ("\$mserv_owner is not defined!\n");
  882. X}
  883. Xif ( defined $mserv_bcc && $mserv_bcc ) {
  884. X    if ( @u = getpwnam ($mserv_bcc) ) {
  885. X    print ("Bcc user: ", $mserv_bcc, ", uid = $u[2], gid = $u[3]",
  886. X           ", \"", $u[6], "\"\n");
  887. X    }
  888. X    else {
  889. X    print ("Bcc user: ", $mserv_bcc, " *** Unknown ***\n");
  890. X    }
  891. X}
  892. Xprint ("\n");
  893. X
  894. Xif ( $have_setruid ) {
  895. X    print ("The 'listener' program will use the setruid system call\n");
  896. X    print ("  It will change identity to compiled-in uid $u[2]\n")
  897. X    if $use_uid;
  898. X    print ("  (setenv will be used to set USER, LOGNAME and HOME)\n")
  899. X    if $have_setenv;
  900. X    if ( -x "$libdir/listener" ) {
  901. X    @st = stat (_);
  902. X    unless ( $st[4] == $u[2] && $st[2] & 0004000 == 0004000 ) {
  903. X        print ("The 'listener' program is not installed correctly!\n",
  904. X           "  It should be installed setuid $mserv_owner\n");
  905. X    }
  906. X    }
  907. X    else {
  908. X    print ("The 'listener' program is not yet installed.\n",
  909. X           "  Do not forget to install it setuid $mserv_owner\n");
  910. X    }
  911. X}
  912. Xelse {
  913. X    print ("The 'listener' program will use 'su' to change identity\n");
  914. X    if ( -x "$libdir/listener" ) {
  915. X    @st = stat (_);
  916. X    unless ( $st[4] == 0 && $st[2] & 0004000 == 0004000 ) {
  917. X        print ("The 'listener' program is not installed correctly!\n",
  918. X           "  It should be installed setuid root\n");
  919. X    }
  920. X    }
  921. X    else {
  922. X    print ("The 'listener' program is not yet installed\n",
  923. X           "  Do not forget to install it setuid root\n");
  924. X    }
  925. X}
  926. Xprint "\n";
  927. X
  928. X$f = $sendmail;
  929. X$f = $` if $f =~ / /;
  930. Xprint ("Replies will be sent using \"$sendmail\" ", &fstat($f,0,1), "\n");
  931. Xprint ("Preset mail headers:\n");
  932. Xprint (defined $sender ? "  $sender\n" : "  *** sender not defined ***\n");
  933. Xprint ("  ", join ("\n  ", @x_headers), "\n") if defined @x_headers;
  934. Xprint ("\n");
  935. X
  936. Xif ( defined @black_list ) {
  937. X    print ("Mail messages from the following users will be ",
  938. X       $black_list_warning ?
  939. X       "flagged with\na warning that they will be rejected in the future:" 
  940. X       : "rejected:",
  941. X       "\n");
  942. X    select (STDOUT);
  943. X    $~ = multi_line;
  944. X    $multi = join (' ', @black_list);
  945. X    $= = 999;
  946. X    write;
  947. X    print ("\n");
  948. X}
  949. X
  950. Xprint ("Transfer strategies:\n");
  951. Xif ( defined $email ) {
  952. X    $f = $chunkmail;
  953. X    $f = $` if $f =~ / /;
  954. X    print ("  email: \"$chunkmail\" ", &fstat($f,0,1), "\n");
  955. X    print ("         wait ", $mailer_delay, " seconds between chunks\n")
  956. X    if defined $mailer_delay;
  957. X    print ("         limits: ", $email_limits[1], "K (default), ",
  958. X       $email_limits[0], "K (min), ", $email_limits[2], "K (max)\n");
  959. X}
  960. Xif ( defined $uucp ) {
  961. X    $f = $uucp;
  962. X    $f = $` if $f =~ / /;
  963. X    print ("  uucp : \"$uucp\" ", &fstat($f,0,1), "\n");
  964. X    $f = $uuname;
  965. X    $f = $` if $f =~ / /;
  966. X    print ("         check host names using \"$uuname\" ", &fstat($f,0,1), "\n")
  967. X    if $uuname ne "";
  968. X    print ("         limits: ", $uucp_limits[1], "K (default), ",
  969. X       $uucp_limits[0], "K (min), ", $uucp_limits[2], "K (max)\n");
  970. X    print ("         uucp transfer is preferred, if possible\n")
  971. X    if $prefer_uucp;
  972. X}
  973. Xunless ( defined $email || defined $uucp ) {
  974. X    print ("  None. *** ARE YOU SURE? ***\n");
  975. X}
  976. Xprint ("\n");
  977. X
  978. Xprint ("Search strategies:");
  979. Xprint (" File") if $dofilesearch;
  980. Xprint (" Directory") if $dodirsearch;
  981. Xprint (" Index") if $doindexsearch;
  982. Xprint ("\n");
  983. Xprint ("\n");
  984. X
  985. Xif ( ! ($dofilesearch || $dodirsearch || $doindexsearch) ) {
  986. X    print ("*** No search strategy defined ***\n\n");
  987. X}
  988. X
  989. Xprint ("Archives:\n");
  990. Xforeach $lib ( @libdirs ) {
  991. X    print ("  ", $lib, " ", &fstat($lib,1,1), "\n");
  992. X}
  993. Xif ( defined $indexfile && defined $indexlib ) {
  994. X    print ("Archive for Index:\n");
  995. X    print ("  ", $indexlib, " ", &fstat($indexlib,1,1), "\n");
  996. X}
  997. Xprint ("\n");
  998. X
  999. Xif ( $doindexsearch && !( defined $indexfile ) ) {
  1000. X    print ("*** No value for `indexfile' ***\n\n");
  1001. X}
  1002. X
  1003. Xif ( $doindexsearch && defined $indexfile ) {
  1004. X    print ("Indexfiles:\n");
  1005. X    if ( $indexfile =~ m|^/| ) {
  1006. X    print ("  ", $indexfile, " ", &fstat($indexfile), "\n");
  1007. X    print ("  Archive for this index: ", $indexlib, "\n")
  1008. X        if defined $indexlib;
  1009. X    }
  1010. X    else {
  1011. X    foreach $lib ( @libdirs ) {
  1012. X        local ($indexfile) = $lib . "/" . $indexfile;
  1013. X        print ("  ", $indexfile, " ", &fstat($indexfile), "\n");
  1014. X    }
  1015. X    }
  1016. X    print ("Limit per index request: ", $maxindexlines, " lines.\n")
  1017. X    if $maxindexlines > 0;
  1018. X    print ("\n");
  1019. X    print ("Index tools:\n");
  1020. X    print ("  gfind      ", $gfind, " ", &fstat($gfind,0,1), "\n");
  1021. X    print ("  ixlookup   ", $ixlookup, " ", &fstat($ixlookup,0,1), "\n");
  1022. X    print ("  locatelib  ", $locatelib, " ", &fstat($locatelib,1,1), "\n");
  1023. X    print ("\n");
  1024. X}
  1025. X
  1026. Xprint ("Server files:\n");
  1027. Xprint ("  queue      ", $queue, " ", &fstat($queue), "\n");
  1028. Xprint ("  logfile    ", $logfile, " ", &fstat($logfile), "\n");
  1029. Xprint ("  lockfile   ", $lockfile, " ", &fstat($lockfile), "\n");
  1030. Xprint ("  notes      ", $notesfile, " ", &fstat($notesfile), "\n");
  1031. Xprint ("  hints      ", $hintsfile, " ", &fstat($hintsfile), "\n");
  1032. Xprint ("\n");
  1033. X
  1034. X# Locking
  1035. Xif ( defined $lock_fcntl ) {
  1036. X    print ("Locking with fcntl(2).\n");
  1037. X}
  1038. Xif ( defined $lock_flock ) {
  1039. X    print ("Locking with flock(2).\n");
  1040. X}
  1041. Xif ( defined $lock_lockf ) {
  1042. X    print ("Locking with syscall(2)/lockf(2).\n");
  1043. X}
  1044. Xif ( defined $lock_fcntl + defined $lock_flock + defined $lock_lockf > 1 ) {
  1045. X    print ("*** Select one lock method.\n");
  1046. X}
  1047. Xif ( defined $lock_fcntl + defined $lock_flock + defined $lock_lockf == 0 ) {
  1048. X    print ("No locking selected. Proceed at your own risk\n");
  1049. X}
  1050. Xelse {
  1051. X    # Just a quick test to see if things fit.
  1052. X    local ($lf) = "/usr/tmp/fl$$";
  1053. X    open (LF, ">$lf");
  1054. X    eval { &locking (*LF, 0); };
  1055. X    print "$@" if "$@";
  1056. X    close (LF);
  1057. X    unlink ($lf);
  1058. X    print ("Use the 'testlock' program to verify the locking! (See INSTALL)\n");
  1059. X}
  1060. Xprint ("\n");
  1061. X
  1062. X%enctab = ("B", "btoa", "U", "uuencode", "X", "xxencode", "D", "uue");
  1063. X
  1064. Xprint ("Default encoding is ", $default_encoding, 
  1065. X       " (", $enctab{$default_encoding}, ")\n");
  1066. Xprint ("Encoders:\n");
  1067. Xforeach $f ( "btoa", "uuencode", "uue", "xxencode" ) {
  1068. X    $exec = eval("\$$f");
  1069. X    printf ("  %-10s %s %s\n", $f, $exec, 
  1070. X        &fstat($exec,0,
  1071. X           $f eq "uuencode" || $f eq $enctab{$default_encoding}),
  1072. X        "\n");
  1073. X}
  1074. Xprint ("\n");
  1075. X
  1076. Xprint ("Tools:\n");
  1077. X$f = $dircmd;
  1078. X$f = $` if $f =~ / /;
  1079. Xprint ("  dir: \"$dircmd\" ", &fstat($f, 0, 1), "\n");
  1080. Xif ( $archie ) {
  1081. X    $f = $archie;
  1082. X    $f = $` if $f =~ / /;
  1083. X    print ("  archie: \"$archie\" ", &fstat($f, 0, 1), "\n");
  1084. X}
  1085. Xif ( $cmd_extend ) {
  1086. X    print ("  extensions: $cmd_extend ",
  1087. X       &fstat ($cmd_extend,0,1), "\n");
  1088. X}
  1089. X
  1090. Xprint ("  feedback limit = ", $fb_limit, "K\n") if $fb_limit;
  1091. Xprint ("\n");
  1092. X
  1093. Xif ( $auto_compress ) {
  1094. X    print ("Support for auto-compression is included.\n");
  1095. X    print ("  Known extensions are tried BEFORE '.Z'.\n")
  1096. X    if $auto_compress > 1;
  1097. X    print ("  Compress using \"$compress\" ", &fstat($compress,0,1), "\n");
  1098. X    print ("\n");
  1099. X}
  1100. X
  1101. Xif ( defined $ftp && $ftp ) {
  1102. X    print ("Support for FTP is included.\n");
  1103. X    print ("  Limited to uucp only.\n") if $ftp_uucp_only;
  1104. X    print ("  Cache dir = ", $ftp_cache, " ",
  1105. X       &fstat ($ftp_cache,1,1), "\n") if $ftp_cache;
  1106. X    print ("  Files are kept for ", $ftp_keep, " days in the cache.\n")
  1107. X    if $ftp_keep;
  1108. X    require "$libdir/pr_ftp.pl";
  1109. X    require "$libdir/dateconv.pl";
  1110. X}
  1111. Xprint ("\n");
  1112. X
  1113. Xif ( defined $packing_limit ) {
  1114. X    print ("Support for packing is included.\n",
  1115. X       "  Packing limit = $packing_limit blocks.\n",
  1116. X       "  Dusk usage obtained using \"$du\" ", &fstat($du,0,1), "\n",
  1117. X       "  File list obtained using \"$find\" ", &fstat($find,0,1), "\n",
  1118. X       "  Methods:");
  1119. X    if ( defined $pdtar ) {
  1120. X    print (" tar ", &fstat($pdtar,0,1));
  1121. X    }
  1122. X    else {
  1123. X    print (" tar ", &fstat($tar,0,1));
  1124. X    }
  1125. X    print (" zip ", &fstat($zip,0,1));
  1126. X    print (" zoo ", &fstat($zoo,0,1));
  1127. X    print ("\n");
  1128. X    if ( defined $pdtar ) {
  1129. X    print ("  Compress/Tar using \"$pdtar\" ", &fstat($pdtar,0,1), "\n");
  1130. X    }
  1131. X    else {
  1132. X    print ("  Compress/Tar using \"$tar\" ", &fstat($tar,0,1), " and ",
  1133. X           "\"$compress\" ", &fstat($compress,0,1), "\n");
  1134. X    }
  1135. X    print ("  Automatic packing of directories is allowed.\n")
  1136. X    if $auto_packing;
  1137. X    print ("\n");
  1138. X}
  1139. Xelse {
  1140. X    print ("Packing functionality not selected.\n\n");
  1141. X}
  1142. Xprint ("Working storage: $tmpdir ", &fstat($tmpdir,1,1), "\n\n");
  1143. Xprint ("The queue will ", $auto_runrequest ? "automatically" : "not",
  1144. X       " be run upon completion of process.\n");
  1145. Xif ( $nice ) {
  1146. X    eval {
  1147. X    if ( setpriority (0, $$, $nice ) ) {
  1148. X        print ("The mail server will be niced with $nice.\n");
  1149. X    }
  1150. X    else {
  1151. X        print ("Cannot set nice value $nice: $!\n");
  1152. X    }
  1153. X    };
  1154. X
  1155. X    if ( $@ ) {
  1156. X    print ("Cannot set nice value $nice: $@\n");
  1157. X    }
  1158. X}
  1159. Xprint ("\n");
  1160. X
  1161. X################ Subroutines ################
  1162. X
  1163. Xsub fstat {
  1164. X    local ($file, $dir, $mustexist) = @_;
  1165. X    return "[*** Not found ***]" if ! -e $file && $mustexist;
  1166. X    return "[Not found, but that's OK]" unless -e _;
  1167. X    return "[*** Not a directory ***]" if $dir && ! -d _;
  1168. X    "[OK]";
  1169. X}
  1170. X
  1171. Xsub options {
  1172. X    require "newgetopt.pl";
  1173. X    $opt_ident = $opt_help = 0;
  1174. X    if ( !&NGetOpt ("config=s", "current", "ident", "help")
  1175. X    || $opt_help
  1176. X    || (@ARGV > 0)) {
  1177. X    &usage;
  1178. X    }
  1179. X    $config_file = $opt_config if defined $opt_config;
  1180. X}
  1181. X
  1182. Xsub usage {
  1183. X    require "ms_common.pl";
  1184. X    print STDERR <<EndOfUsage;
  1185. X$my_package [$my_name $my_version]
  1186. X
  1187. XUsage: $my_name [-options]
  1188. X
  1189. XOptions:
  1190. X    -config XX    use alternate config
  1191. X    -current    use current directory instead of $libdir
  1192. X    -help    this message
  1193. X    -ident    print identification
  1194. XEndOfUsage
  1195. X    exit (1);
  1196. X}
  1197. X
  1198. Xformat multi_line =
  1199. X~~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  1200. X$multi
  1201. X.
  1202. END_OF_FILE
  1203.   if test 11186 -ne `wc -c <'mserv-3.1/chkconfig.pl'`; then
  1204.     echo shar: \"'mserv-3.1/chkconfig.pl'\" unpacked with wrong size!
  1205.   fi
  1206.   # end of 'mserv-3.1/chkconfig.pl'
  1207. fi
  1208. if test -f 'mserv-3.1/dorequest.pl' -a "${1}" != "-c" ; then 
  1209.   echo shar: Will not clobber existing file \"'mserv-3.1/dorequest.pl'\"
  1210. else
  1211.   echo shar: Extracting \"'mserv-3.1/dorequest.pl'\" \(8553 characters\)
  1212.   sed "s/^X//" >'mserv-3.1/dorequest.pl' <<'END_OF_FILE'
  1213. X#!/usr/local/bin/perl
  1214. X# dorequest.pl -- 
  1215. X# SCCS Status     : @(#)@ dorequest    3.28
  1216. X# Author          : Johan Vromans
  1217. X# Created On      : ***
  1218. X# Last Modified By: Johan Vromans
  1219. X# Last Modified On: Wed Dec 23 23:02:01 1992
  1220. X# Update Count    : 149
  1221. X# Status          : Going steady
  1222. X
  1223. X# Usage: dorequest [options] -- to run the queue
  1224. X#
  1225. X#     dorequest [options] address file [ encoding [ limit [ list ] ] ]
  1226. X#        -- to send a file 'by hand'.
  1227. X#
  1228. X#   address : where to send the information to.
  1229. X#          If left empty, no splitting is done, and the result
  1230. X#          is written to stdout.
  1231. X#
  1232. X#   file    : the file to send.
  1233. X#
  1234. X#   encoding: how to encode it: U (uuencode), B (btoa), D (Dumas uue)
  1235. X#          or A (plain).
  1236. X#             Default is btoa.
  1237. X#          Adding a Z to the encoding will have the file compressed first.
  1238. X#
  1239. X#   limit   : how many bytes per transmission.
  1240. X#             Default is 32768
  1241. X#
  1242. X#   parts   : comma-separated list of part numbers.
  1243. X#             When used, only these parts are sent.
  1244. X#
  1245. X$my_name = "dorequest";
  1246. X$my_version = "3.28";
  1247. X#
  1248. X################ Common stuff ################
  1249. X
  1250. X$libdir = $ENV{"MSERVLIB"} || "/usr/local/lib/mserv";
  1251. Xunshift (@INC, $libdir);
  1252. X
  1253. X################ Options handling ################
  1254. X
  1255. X&options if @ARGV > 0 && $ARGV[0] =~ /^-+[^-]+/;
  1256. Xundef $mailer_delay if $opt_debug;
  1257. X
  1258. X################ More common stuff ################
  1259. X
  1260. X# Require common here, so $opt_config can be used to select an
  1261. X# alternate configuration file.
  1262. Xrequire "ms_common.pl";
  1263. X
  1264. X################ Setting up ################
  1265. X
  1266. Xif ( @ARGV > 0 ) {
  1267. X    &usage unless @ARGV > 1;
  1268. X    local ($rcpt, $address, $request, $file, $encoding, $limit, $parts);
  1269. X    local ($remove_file) = 0;
  1270. X    ($rcpt, $file, $encoding, $limit, $parts) = @ARGV;
  1271. X    $request = $file;
  1272. X    $address = $rcpt;
  1273. X    require "$libdir/dr_mail.pl";
  1274. X    &mail_request ($rcpt, $address, '', $request, $file, 
  1275. X           $encoding, $limit, $parts);
  1276. X}
  1277. Xelse {
  1278. X    &synchronize;
  1279. X    &seize_queue;
  1280. X
  1281. X    # Be nice and forgiving
  1282. X    eval { setpriority (0, $$, $nice) } if $nice;
  1283. X
  1284. X    while ( @queue > 0 ) {
  1285. X    local ($current_queue_entry) = &shift_queue;
  1286. X    local (@arg) = split (/[\t\n]/, $current_queue_entry);
  1287. X    $current_queue_entry = join ("\t", @arg);
  1288. X    local ($cmd) = shift (@arg);
  1289. X    local ($remove_file) = $cmd =~ /^[a-z]+$/;
  1290. X
  1291. X    $cmd =~ tr/a-z/A-Z/ if $remove_file;
  1292. X        
  1293. X    if ( $cmd eq "M" ) {
  1294. X        require "$libdir/dr_mail.pl";
  1295. X        eval { &mail_request (@arg); };
  1296. X    }
  1297. X    elsif ( $cmd eq "U" ) {
  1298. X        require "$libdir/dr_uucp.pl";
  1299. X        eval { &uucp_request (@arg); };
  1300. X    }
  1301. X    elsif ( $cmd eq "MP" ) {
  1302. X        require "$libdir/dr_pack.pl";
  1303. X        eval { &pack_mail_request (@arg); };
  1304. X    }
  1305. X    elsif ( $cmd eq "UP" ) {
  1306. X        require "$libdir/dr_pack.pl";
  1307. X        eval { &pack_uucp_request (@arg); };
  1308. X    }
  1309. X    else {
  1310. X        # This is fatal!
  1311. X        &die ("Illegal request in queue: $cmd @arg");
  1312. X    }
  1313. X    }
  1314. X    # Get rid of queue backup file.
  1315. X    unlink ("$queue~");
  1316. X}
  1317. X
  1318. Xexit (0);
  1319. X
  1320. X################ Subroutines ################
  1321. X
  1322. Xsub synchronize {
  1323. X
  1324. X    # NOTE: It is very important to prevent multiple copies
  1325. X    #        of this program to run at the same time!
  1326. X
  1327. X    # Proceed at your own risk here...
  1328. X    return unless defined $lockfile;
  1329. X
  1330. X    # Create lockfile if it does not exists.
  1331. X    if ( ! -e $lockfile ) {
  1332. X    open (LF, ">$lockfile");
  1333. X    close (LF);
  1334. X    }
  1335. X
  1336. X    # Open it, and get exclusive access.
  1337. X    open (LF, "+<$lockfile")
  1338. X    || &die ("Cannot gain lock [$!]");
  1339. X    local ($ret) = &locking (*LF, 0);
  1340. X    # Exit gracefully if some other invocation has the lock.
  1341. X    exit (0) if $ret == 0;
  1342. X    &die ("Cannot lock lockfile [$!]") unless $ret == 1;
  1343. X
  1344. X    # We keep it locked until process termination.
  1345. X}
  1346. X
  1347. Xsub seize_queue {
  1348. X
  1349. X    local ($queuecnt);
  1350. X
  1351. X    # First, check the queue backup. This file can exists only
  1352. X    # if a previous run failed to terminate normally.
  1353. X    if (open (QUEUE, "$queue~")) {
  1354. X    @queue = <QUEUE>;    # Slurp.
  1355. X    close (QUEUE);
  1356. X    unlink ("$queue~")
  1357. X        || &die ("Cannot unlink queue~ [$!]");
  1358. X    $queuecnt = @queue;
  1359. X    print STDERR ("Got $queuecnt entries from $queue~\n")
  1360. X        if $opt_debug;
  1361. X    }
  1362. X    else {
  1363. X    @queue = ();
  1364. X    $queuecnt = 0;
  1365. X    }
  1366. X
  1367. X    # Now check the current queue. We use exclusive access to make
  1368. X    # sure no other process is updating it.
  1369. X    # Again, proceed at your own risk if you're not using locks.
  1370. X    if (open (QUEUE, "+<$queue" )) {
  1371. X    # We cannot use rename queue -> queue~, since some other process
  1372. X    # may already be waiting for the queue to become free.
  1373. X    # Therefore slurp + truncate it.
  1374. X    if ( &locking (*QUEUE, 1) ) {
  1375. X        push (@queue, <QUEUE>); # Slurp.
  1376. X        truncate ($queue, 0)
  1377. X        || &die ("Cannot truncate queue [$!]");
  1378. X        close (QUEUE);
  1379. X    }
  1380. X    else {
  1381. X        &die ("Cannot seize queue [$!]");
  1382. X    }
  1383. X    print STDERR ("Got ",  @queue-$queuecnt, " entries from $queue\n")
  1384. X        if $opt_debug;
  1385. X    }
  1386. X    # 'No queue' is a normal situation....
  1387. X}
  1388. X
  1389. Xsub shift_queue {
  1390. X    # Sync the memory copy of the queue to disk (in the queue backup
  1391. X    # file), and extract the first entry of it.
  1392. X
  1393. X    open (QUEUE, ">$queue~")
  1394. X    || &die ("Cannot sync queue [$!]");
  1395. X    print QUEUE @queue;        # Blurb.
  1396. X    close (QUEUE);
  1397. X
  1398. X    # Get entry from queue and return it.
  1399. X    shift (@queue);
  1400. X}
  1401. X
  1402. Xsub check_file {
  1403. X    local ($file, $dir) = @_;
  1404. X
  1405. X    # Check if a given file still exists. Non-existent files are
  1406. X    # trapped anyway, but this gives a better error message.
  1407. X
  1408. X    return 1 if -r $file && ( $dir ? ( -d _ && -x _ ) : -f _ );
  1409. X    &die (($dir ? "Directory" : "File") . 
  1410. X      " \"$file\" is no longer available");
  1411. X}
  1412. X
  1413. X################ subroutines ################
  1414. X
  1415. Xsub system {
  1416. X    local ($cmd) = (@_);
  1417. X    local ($ret);
  1418. X    local ($opt_nolog) = 0;
  1419. X    print STDERR ("+ $cmd\n") if $opt_trace;
  1420. X    $ret = system ($cmd);
  1421. X    &die (sprintf ("Return 0x%x from \"$cmd\"", $ret))
  1422. X    unless $ret == 0;
  1423. X    $ret;
  1424. X}
  1425. X
  1426. Xsub symlink {
  1427. X    local ($old, $new) = @_;
  1428. X    print STDERR ("+ symlink $old $new\n") if $opt_trace;
  1429. X    symlink ($old, $new)
  1430. X    || &die ("Cannot symlink $old to $new [$!]\n");
  1431. X}
  1432. X
  1433. Xsub die {
  1434. X    local ($msg) = (@_);
  1435. X    local ($opt_nolog) = 0;    # Will force logging
  1436. X    local ($opt_debug) = 1;    # Will force msg to STDERR
  1437. X    &writelog ("F $msg");
  1438. X    if ( defined $current_queue_entry ) {
  1439. X    &writelog ("Q $current_queue_entry");
  1440. X    &feedback ($current_queue_entry, $msg);
  1441. X    }
  1442. X    die ("Aborted\n");
  1443. X}
  1444. X
  1445. Xsub feedback {
  1446. X    local ($q, $msg) = @_;
  1447. X
  1448. X    # Try to send a message to the requestor indicating
  1449. X    # something went wrong.
  1450. X
  1451. X    local ($type, $rcpt, @q) = split (/ /, $q);
  1452. X    local ($file, $req, $method);
  1453. X    if ( $type =~ /^U/ ) {
  1454. X    ($req, $file) = @q[2,3];
  1455. X    $method = "via UUCP to \"$q[0]\"";
  1456. X    }
  1457. X    else {
  1458. X    ($req, $file) = @q[1,2];
  1459. X    $method = "via email to \"$q[0]\"";
  1460. X    }
  1461. X
  1462. X    local ($cmd) = "$sendmail '" . $rcpt . "'";
  1463. X
  1464. X    print STDERR ("+ |", $cmd, "\n") if $opt_trace;
  1465. X
  1466. X    return unless open (MAIL, "|" . $cmd);
  1467. X    print MAIL <<EOD;
  1468. XTo: $rcpt
  1469. XSubject: Mail Server error
  1470. XX-Server: $my_package [$my_name $my_version]
  1471. XX-Oops: I am sorry for the inconvenience
  1472. X
  1473. XDear user,
  1474. X
  1475. XEOD
  1476. X    $message = "A mail server error has occurred while trying to transfer ".
  1477. X    "\"$file\" $method in response to your request for \"$req\".";
  1478. X    select (MAIL); 
  1479. X    $~ = "fill";
  1480. X    write;
  1481. X    print MAIL <<EOD;
  1482. X
  1483. XThe error message was:
  1484. X   $msg
  1485. X
  1486. XYou may wish to resubmit your request, or consult the mail server 
  1487. Xmaintainer. 
  1488. X(He knows about the error already, no need to inform him.)
  1489. X
  1490. XEOD
  1491. X    close (MAIL);
  1492. X    select (STDOUT);
  1493. X}
  1494. X
  1495. Xformat fill =
  1496. X^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
  1497. X$message
  1498. X.
  1499. X
  1500. Xsub options {
  1501. X    require "newgetopt.pl";
  1502. X    if ( !&NGetOpt ("config=s", "nomail", "nouucp", "nolog", "keep=s",
  1503. X            "debug", "trace", "help")
  1504. X    || defined $opt_help ) {
  1505. X    &usage;
  1506. X    }
  1507. X    $opt_trace |= $opt_debug;
  1508. X    $config_file = $opt_config if defined $opt_config;
  1509. X}
  1510. X
  1511. Xsub usage {
  1512. X    require "ms_common.pl";
  1513. X    print STDERR <<EndOfUsage;
  1514. X$my_package [$my_name $my_version]
  1515. X
  1516. XUsage: $my_name [options] [address file [coding [size [parts]]]]
  1517. X
  1518. XOptions:
  1519. X    -config XX    use alternate config file
  1520. X    -keep XXX    keep temporary files, using prefix XXX (for debugging)
  1521. X    -help    this message
  1522. X    -nolog    do not make entries in the logfile
  1523. X    -trace    show commands
  1524. X    -debug    for debugging
  1525. X    -nomail    do not deliver via email (for debugging)
  1526. X    -nouucp    do not deliver via uucp (for debugging)
  1527. X
  1528. Xaddress        destination for this request.
  1529. X        If empty: do not split and write to STDOUT.
  1530. Xfile        the file to send.
  1531. Xcoding        encoding (Btoa, Uuencode, Dumas uue or Plain, def Btoa).
  1532. Xsize        max. size per chunk, def 32K.
  1533. Xparts        comma-separated list of parts to re-send.
  1534. X        If omitted: send all parts
  1535. XEndOfUsage
  1536. X    exit (!defined $opt_help);
  1537. X}
  1538. END_OF_FILE
  1539.   if test 8553 -ne `wc -c <'mserv-3.1/dorequest.pl'`; then
  1540.     echo shar: \"'mserv-3.1/dorequest.pl'\" unpacked with wrong size!
  1541.   fi
  1542.   # end of 'mserv-3.1/dorequest.pl'
  1543. fi
  1544. if test -f 'mserv-3.1/pr_parse.pl' -a "${1}" != "-c" ; then 
  1545.   echo shar: Will not clobber existing file \"'mserv-3.1/pr_parse.pl'\"
  1546. else
  1547.   echo shar: Extracting \"'mserv-3.1/pr_parse.pl'\" \(17491 characters\)
  1548.   sed "s/^X//" >'mserv-3.1/pr_parse.pl' <<'END_OF_FILE'
  1549. X# pr_parse.pl -- 
  1550. X# SCCS Status     : @(#)@ pr_parse.pl    1.7
  1551. X# Author          : Johan Vromans
  1552. X# Created On      : Fri Dec 18 21:03:34 1992
  1553. X# Last Modified By: Johan Vromans
  1554. X# Last Modified On: Fri Jan  1 15:10:55 1993
  1555. X# Update Count    : 97
  1556. X# Status          : Unknown, Use with caution!
  1557. X
  1558. X$cmd_tbl{'END'}      = 'cmd_end';
  1559. X$cmd_tbl{'EXIT'}     = $cmd_tbl{'END'};
  1560. X$cmd_tbl{'QUIT'}     = $cmd_tbl{'END'};
  1561. X$cmd_tbl{'BEGIN'}    = $interactive ? 'cmd_ignore' : 'cmd_begin';
  1562. X$cmd_tbl{'RESET'}    = $cmd_tbl{'BEGIN'};
  1563. X$cmd_tbl{'REPLY'}    = $interactive ? 'cmd_ignore' : 'cmd_reply';
  1564. X$cmd_tbl{'PATH'}     = $cmd_tbl{'REPLY'};
  1565. X$cmd_tbl{'MAIL'}     = 'cmd_mail' if defined $email;
  1566. X$cmd_tbl{'UUCP'}     = 'cmd_uucp' if defined $uucp;
  1567. X$cmd_tbl{'LIMIT'}    = 'cmd_limit';
  1568. X$cmd_tbl{'UUENCODE'} = 'cmd_uuencode';
  1569. X$cmd_tbl{'UUDECODE'} = $cmd_tbl{'UUENCODE'};
  1570. X$cmd_tbl{'UU'}       = $cmd_tbl{'UUENCODE'};
  1571. X$cmd_tbl{'XXENCODE'} = 'cmd_xxencode';
  1572. X$cmd_tbl{'XXDECODE'} = $cmd_tbl{'XXENCODE'};
  1573. X$cmd_tbl{'XX'}       = $cmd_tbl{'XXENCODE'};
  1574. X$cmd_tbl{'UUE'}      = 'cmd_uue';
  1575. X$cmd_tbl{'UUD'}      = $cmd_tbl{'UUE'};
  1576. X$cmd_tbl{'BTOA'}     = 'cmd_btoa';
  1577. X$cmd_tbl{'ATOB'}     = $cmd_tbl{'BTOA'};
  1578. X$cmd_tbl{'ENCODE'}   = 'cmd_encode';
  1579. X$cmd_tbl{'ENCODING'} = $cmd_tbl{'ENCODE'};
  1580. X$cmd_tbl{'COMPRESS'} = 'cmd_compress';
  1581. X$cmd_tbl{'SEND'}     = 'cmd_send';
  1582. X$cmd_tbl{'TOPIC'}    = $cmd_tbl{'SEND'};
  1583. X$cmd_tbl{'GET'}      = $cmd_tbl{'SEND'};
  1584. X$cmd_tbl{'RESEND'}   = 'cmd_resend';
  1585. X$cmd_tbl{'PACK'}     = 'cmd_pack' if defined $packing_limit && $packing_limit;
  1586. X$cmd_tbl{'SEARCH'}   = 'cmd_search';
  1587. X$cmd_tbl{'INDEX'}    = 'cmd_index';
  1588. X$cmd_tbl{'HELP'}     = 'cmd_help';
  1589. X$cmd_tbl{'REQUEST'}  = 'cmd_request';
  1590. X$cmd_tbl{'DIR'}      = 'cmd_dir';
  1591. X$cmd_tbl{'LIST'}     = $cmd_tbl{'DIR'};
  1592. X$cmd_tbl{'LS'}       = $cmd_tbl{'DIR'};
  1593. X$cmd_tbl{'CWD'}      = 'cmd_cwd';
  1594. X$cmd_tbl{'FTP'}      = 'cmd_ftp' if $ftp;
  1595. X$cmd_tbl{'ARCHIE'}   = 'cmd_archie' if $archie;
  1596. X$cmd_tbl{'TEST'}     = 'cmd_test';
  1597. X
  1598. X# Add user commands...
  1599. Xdo $cmd_extend if $cmd_extend && -r $cmd_extend;
  1600. X
  1601. Xsub command_loop {
  1602. X
  1603. X    local ($res, $cmd, @cmd);
  1604. X    local ($curdir) = "";    # track current directory
  1605. X    local ($ftphost);        # empty -> no FTP, otherwise -> FTP
  1606. X    local (*line, *DATA_LINE) = (*rfc822'line, *rfc822'DATA_LINE);
  1607. X    local (*line_in_cache) = (*rfc822'line_in_cache);
  1608. X    local ($tmp, $proc, $result);
  1609. X
  1610. X    while ( $res = &read_body ) {
  1611. X
  1612. X    next if $res != $DATA_LINE;
  1613. X
  1614. X    # Allow continuation lines.
  1615. X    $tmp = '';
  1616. X    while ( $line =~ /\\$/ && $res == $DATA_LINE ) {
  1617. X        $tmp .= $line;    # Append w/o intervening space
  1618. X        chop ($tmp);    # Get rid of \
  1619. X        if (  ($res = &read_body) == $DATA_LINE ) {
  1620. X        $line =~ s/^\s+//; # Strip leading spaces.
  1621. X        }
  1622. X    }
  1623. X    $line = $tmp . $line;
  1624. X
  1625. X    last unless &split_and_exec_line;
  1626. X
  1627. X    print STDOUT ("\n");
  1628. X    }
  1629. X    print STDOUT ("\n");
  1630. X}
  1631. X
  1632. Xsub interactive_loop {
  1633. X    # Yes, this is almost a copy of command_loop.
  1634. X
  1635. X    local ($cmd, @cmd);
  1636. X    local ($curdir) = "";    # track current directory
  1637. X    local ($ftphost);        # empty -> no FTP, otherwise -> FTP
  1638. X    local ($line, $line_in_cache);
  1639. X    local ($tmp, $proc, $result);
  1640. X
  1641. X    print STDOUT ("Enter HELP for a list of commands.\n\n");
  1642. X    print STDOUT ("Command> ");
  1643. X
  1644. X    while ( $line = $line_in_cache ? $line_in_cache : scalar(<STDIN>) ) {
  1645. X
  1646. X    chop ($line);
  1647. X    undef $line_in_cache;
  1648. X    next unless $line =~ /\S/;
  1649. X
  1650. X    # Allow continuation lines.
  1651. X    $tmp = '';
  1652. X    while ( $line =~ /\\$/ ) {
  1653. X        $tmp .= $line;    # Append w/o intervening space
  1654. X        chop ($tmp);    # Get rid of \
  1655. X        print STDOUT ("       > ");
  1656. X        if (  ($line = <STDIN> ) ) {
  1657. X        $line =~ s/^\s+//; # Strip leading spaces.
  1658. X        }
  1659. X    }
  1660. X    $line = $tmp . $line;
  1661. X
  1662. X    last unless &split_and_exec_line;
  1663. X
  1664. X    print STDOUT ("\nCommand> ") unless $line_in_cache;
  1665. X    }
  1666. X
  1667. X    if ( $ftphost ) {
  1668. X    push (@workq, &zp ('G', 'C'));
  1669. X    require "$libdir/pr_dowork.pl";
  1670. X    &work_loop;
  1671. X    }
  1672. X
  1673. X    print STDOUT ("\n");
  1674. X    $errflag = 0;
  1675. X}
  1676. X
  1677. Xsub split_and_exec_line {
  1678. X
  1679. X    # Allow multiple commands on a line.
  1680. X    if ( $line =~ /\s*;\s*/ ) {
  1681. X    $line_in_cache = "$'\n";
  1682. X    $line = $`;
  1683. X    }
  1684. X
  1685. X    $line =~ s/\s+/ /g;
  1686. X    $commands++;
  1687. X    print STDOUT "Command: $line\n";
  1688. X
  1689. X    # Try to handle "REQUEST: foo" neatly
  1690. X    $line =~ s/(\s+:|:\s+)/ /g;
  1691. X
  1692. X    @cmd = split (/[\t ,=]+/, $line);
  1693. X    @cmd = grep ( $_ ne "", @cmd);
  1694. X
  1695. X    # Get command verb, shifting leading "set" verb.
  1696. X    do {
  1697. X    $cmd = shift (@cmd);
  1698. X    last unless $cmd;
  1699. X    $cmd  =~ tr/[a-z]/[A-Z]/;
  1700. X    } while ( $cmd eq "SET" );
  1701. X
  1702. X    # Execute command parsing procedure.
  1703. X    # A command parsing procedure may return one of the following values:
  1704. X    #  > 0 : command parsed (either OK or in error)
  1705. X    #   0  : pretend that command does not exist
  1706. X    #  < 0 : terminate processing
  1707. X
  1708. X    if ( defined ( $proc = $cmd_tbl{$cmd} ) &&
  1709. X    ( $result = &$proc ) != 0 ) {
  1710. X
  1711. X    # This is to implement the END command...
  1712. X    return 0 if $result < 0;
  1713. X
  1714. X    # And this is for interactive use.
  1715. X    return 1 unless $interactive;
  1716. X
  1717. X    if ( @indexq > 0 ) {
  1718. X        require "$libdir/pr_doindex.pl";
  1719. X        &index_loop;
  1720. X    }
  1721. X    if ( @searchq > 0 ) {
  1722. X        &search_loop;
  1723. X    }
  1724. X    if ( @workq > 0 ) {
  1725. X        require "$libdir/pr_dowork.pl";
  1726. X        &work_loop;
  1727. X    }
  1728. X    }
  1729. X    else {
  1730. X    # Unknown, or &$proc returned zero.
  1731. X    &errmsg ("Command $cmd unknown");
  1732. X    }
  1733. X    1;
  1734. X}
  1735. X
  1736. Xsub cmd_ignore {
  1737. X    &warning ("$cmd command ignored");
  1738. X}
  1739. X
  1740. X################ exit | end ################
  1741. X
  1742. Xsub cmd_end {
  1743. X    print STDOUT ("=> Okay");
  1744. X    print STDOUT (" (rest of command ignored)") if @cmd;
  1745. X    print STDOUT ("\n");
  1746. X
  1747. X    # Terminate outer loop.
  1748. X    return -1;
  1749. X}
  1750. X
  1751. X################ begin ################
  1752. X
  1753. Xsub cmd_begin {
  1754. X    return &errmsg ("Usage: $cmd") if @cmd != 0;
  1755. X
  1756. X    print STDOUT "=> Resetting\n";
  1757. X    &reset;
  1758. X    1;
  1759. X}
  1760. X
  1761. X################ reply <address> ################
  1762. X
  1763. Xsub cmd_reply {
  1764. X    return &errmsg ("$cmd command must precede all other commands")
  1765. X    if @workq + @searchq + @indexq;
  1766. X
  1767. X    shift (@cmd) if $cmd[0] =~ /^to$/i;
  1768. X
  1769. X    return &errmsg ("Usage: $cmd email-address") if @cmd != 1;
  1770. X
  1771. X    &parse_addresses ($cmd[0]);
  1772. X    return &errmsg ("Invalid return address: \"$cmd[0]\"")
  1773. X    if @rfc822'addresses != 1;    #';
  1774. X
  1775. X    $recipient = shift (@rfc822'addresses);    #');
  1776. X    push (@workq, &zp ("M", $recipient));
  1777. X    print STDOUT "=> Return address: \"$recipient\"\n";
  1778. X    1;
  1779. X}
  1780. X
  1781. X################ mail <address> ################
  1782. X
  1783. Xsub cmd_mail {
  1784. X    if ( @cmd == 0 && $interactive && $method ) {
  1785. X    &method_msg;
  1786. X    return 1;
  1787. X    }
  1788. X
  1789. X    return &errmsg ("$cmd command must precede other commands")
  1790. X    if $method && !$interactive;
  1791. X
  1792. X    shift (@cmd) if $cmd[0] =~ /^to$/i;
  1793. X
  1794. X    return &errmsg ("Usage: $cmd email-address") if @cmd != 1;
  1795. X
  1796. X    &parse_addresses ($cmd[0]);
  1797. X    return &errmsg ("Invalid return address: \"$sender\"")
  1798. X    if @rfc822'addresses != 1;    #';
  1799. X
  1800. X    &email_defaults ($rfc822'addresses[0]);    #');
  1801. X    1;
  1802. X}
  1803. X
  1804. X################ uucp <path> ################
  1805. X
  1806. Xsub cmd_uucp {
  1807. X    if ( @cmd == 0 && $interactive && $method ) {
  1808. X    &method_msg;
  1809. X    return 1;
  1810. X    }
  1811. X
  1812. X    return &errmsg ("$cmd command must precede other commands")
  1813. X    if $method && !$interactive;
  1814. X
  1815. X    local ($msg) = "Usage: $cmd host!path user";
  1816. X
  1817. X    shift (@cmd) if $cmd[0] =~ /^to$/i;
  1818. X
  1819. X    if ( @cmd < 2 && $h_uufrom && $h_uuhost ) {
  1820. X    if ( @cmd == 0 ) {
  1821. X        @cmd = ('!', '');
  1822. X    }
  1823. X    elsif ( @cmd == 1 ) {
  1824. X        if ($cmd[0] =~ /^\w[-\w]*$/ ) {
  1825. X        unshift (@cmd, '!');
  1826. X        }
  1827. X        else {
  1828. X        push (@cmd, '');
  1829. X        }
  1830. X    }
  1831. X    }
  1832. X
  1833. X    return &errmsg ($msg) unless @cmd == 2;
  1834. X
  1835. X    local ($uupath, $uunote) = @cmd;
  1836. X
  1837. X    if ( $uupath !~ /!/ && $h_uuhost ) {
  1838. X    $uupath = $h_uuhost . '!' . $uupath;
  1839. X    }
  1840. X
  1841. X    if ( $uupath =~ /!/ ) {
  1842. X    &uucp_defaults ($`, $', $uunote);
  1843. X    }
  1844. X    else {
  1845. X    return &errmsg ($msg);
  1846. X    }
  1847. X    1;
  1848. X}
  1849. X
  1850. X################ limit [ <number>[K] ] ################
  1851. X
  1852. Xsub cmd_limit {
  1853. X    if ( @cmd == 0 ) {
  1854. X    push (@workq, &zp ("L", $limits[1]));
  1855. X    print STDOUT "=> Limit = $limits[1]K (default)\n";
  1856. X    }
  1857. X    elsif ( $cmd[0] =~ /^(\d+)K?$/i ) {
  1858. X    local ($new) = $1;
  1859. X    local ($msg) = "LIMIT must be between ".
  1860. X        "$limits[0]K and $limits[2]K";
  1861. X
  1862. X    if ( $new < $limits[0] ) {
  1863. X        $new = $limits[0];
  1864. X        &warning ($msg);
  1865. X    }
  1866. X    elsif ( $new > $limits[2] ) {
  1867. X        $new = $limits[2];
  1868. X        &warning ($msg);
  1869. X    }
  1870. X    push (@workq, &zp ("L", $new));
  1871. X    print STDOUT "=> Limit = ${new}K\n";
  1872. X    }
  1873. X    else {
  1874. X    return &errmsg ("Usage: $cmd [ number[K] ]");
  1875. X    }
  1876. X    1;
  1877. X}
  1878. X
  1879. X################ various encoders ################
  1880. X
  1881. Xsub cmd_encode {
  1882. X    if (  @cmd == 1 ) {
  1883. X    local ($tag) = shift (@cmd);
  1884. X    return &cmd_uuencode
  1885. X        if $tag =~ /^uu(en|de)cod(e|ing)$/i;
  1886. X    return &cmd_xxencode
  1887. X        if $tag =~ /^xx(en|de)cod(e|ing)$/i;
  1888. X    return &cmd_uue
  1889. X        if $tag =~ /^uu(e|d)$/i;
  1890. X    return &cmd_btoa
  1891. X        if $tag =~ /^(btoa|atob)$/i;
  1892. X    }
  1893. X    return &errmsg ("Usage: $cmd [ uuencode | xxencode | uue | btoa ]")
  1894. X}
  1895. Xsub cmd_uuencode {
  1896. X    &setencoding ("uuencoding", $uuencode, "U");
  1897. X}
  1898. Xsub cmd_xxencode {
  1899. X    &setencoding ("xxencoding", $xxencode, "X");
  1900. X}
  1901. Xsub cmd_uue {
  1902. X    &setencoding ("uue", $uue, "D");
  1903. X}
  1904. Xsub cmd_btoa {
  1905. X    &setencoding ("btoa", $btoa, "B");
  1906. X}
  1907. X
  1908. Xsub setencoding {
  1909. X    local ($tag, $encoder, $encoding) = @_;
  1910. X    if ( @cmd == 0 ) {
  1911. X    if ( -x $encoder ) {
  1912. X        push (@workq, &zp ("E", $encoding));
  1913. X        print STDOUT "=> Encoding = $encoding ($tag)\n";
  1914. X    }
  1915. X    else {
  1916. X        print STDOUT "=> Encoding '$tag' not available\n";
  1917. X    }
  1918. X    }
  1919. X    else {
  1920. X    $tag =~ tr/a-z/A-Z/;
  1921. X    &errmsg ("$tag does not take any arguments");
  1922. X    }
  1923. X}
  1924. X
  1925. Xsub cmd_compress {
  1926. X    &cmd_ignore;
  1927. X    print STDOUT <<EOD if $auto_compress;
  1928. X=> If you request 'file.Z' I'll compress it automatically if I find
  1929. X   an uncompressed version of it.
  1930. XEOD
  1931. X    1;
  1932. X}
  1933. X
  1934. X################ send <item> [ <item>...] ################
  1935. X
  1936. Xsub cmd_send {
  1937. X    return &errmsg ("Usage: $cmd item [ item ... ]") unless @cmd > 0;
  1938. X
  1939. X    local ($ftphost) = $ftphost;
  1940. X    foreach $item ( @cmd ) {
  1941. X    if ( $item =~ m:(^\.|/\.|[*?%]): ) {
  1942. X        return &errmsg ("Illegal request");
  1943. X    }
  1944. X    if ( $item =~ /:/ || $ftphost ) {
  1945. X        return 1 unless &check_ftp;
  1946. X        push (@workq, &zp ('G', 'G', $curdir.$item)); 
  1947. X        print STDOUT "=> Send: $curdir$item\n";
  1948. X    }
  1949. X    else {
  1950. X        return 1 unless &setdefaults;
  1951. X        push (@workq, &zp ("S", $curdir.$item)); 
  1952. X        print STDOUT "=> Send: $curdir$item\n";
  1953. X    }
  1954. X    }
  1955. X    1;
  1956. X}
  1957. X
  1958. X################ resend <item> <number> [ <number>...] ################
  1959. X
  1960. Xsub cmd_resend {
  1961. X    local ($msg) = "Usage: $cmd item part# [ part# ... ]";
  1962. X
  1963. X    return &errmsg ($msg) unless @cmd > 1;
  1964. X
  1965. X    local ($item) = shift (@cmd);
  1966. X    local ($plist) = "";
  1967. X    local ($ftphost) = $ftphost;
  1968. X
  1969. X    if ( $item =~ m:(^\.|/\.|[*?%]): ) {
  1970. X    return &errmsg ("Illegal request");
  1971. X    }
  1972. X    foreach $num (@cmd) {
  1973. X    if ( $num =~ /^\d+$/ ) {
  1974. X        $plist .= 0+$num . ",";
  1975. X    }
  1976. X    else {
  1977. X        return &errmsg ($msg);
  1978. X    }
  1979. X    }
  1980. X    if ( $item =~ /:/ || $ftphost ) {
  1981. X    return 1 unless &check_ftp;
  1982. X    chop ($plist);
  1983. X    push (@workq, &zp ('G', 'G', $curdir.$item, $plist));
  1984. X    print STDOUT ("=> Resend: $curdir$item, part",
  1985. X              (@plist > 0) ? "s " : " ",
  1986. X              $plist, "\n");
  1987. X    }
  1988. X    else {
  1989. X    return 1 unless &setdefaults;
  1990. X    chop ($plist);
  1991. X    push (@workq, &zp ("S", $curdir.$item, $plist));
  1992. X    print STDOUT ("=> Resend: $curdir$item, part",
  1993. X              (@plist > 0) ? "s " : " ",
  1994. X              $plist, "\n");
  1995. X    }
  1996. X    1;
  1997. X}
  1998. X
  1999. X################ pack ################
  2000. X
  2001. Xsub cmd_pack {
  2002. X    if ( @cmd != 1 ) {
  2003. X    return     &errmsg ("Usage: $cmd { ".
  2004. X         (-x $tar ? "tar | " : "").
  2005. X         (-x $zip ? "zip | " : "").
  2006. X         (-x $zoo ? "zoo | " : "").
  2007. X         "off }");
  2008. X    }
  2009. X
  2010. X    local ($packing);
  2011. X
  2012. X    ($packing = $cmd[0]) =~ tr/[A-Z]/[a-z]/;
  2013. X    if ( ($packing eq "tar" && (-x $tar || -x $pdtar)) ||
  2014. X     ($packing eq "zip" && -x $zip) ||
  2015. X     ($packing eq "zoo" && -x $zoo) ) {
  2016. X    push (@workq, &zp ("P", $packing));
  2017. X    print STDOUT ("=> Subsequent requests must be directories",
  2018. X              " that will be ",
  2019. X              "packed using '$packing'.\n",
  2020. X              "   Note that a limit of ",
  2021. X              int ($packing_limit/2), 
  2022. X              " Kbytes applies to each request.\n",
  2023. X              "   Requests exceeding this limit ",
  2024. X              "will be discarded.\n");
  2025. X    } 
  2026. X    elsif ( $packing eq "off" ) {
  2027. X    push (@workq, &zp ("P"));
  2028. X    print STDOUT "=> No more packing\n";
  2029. X    }
  2030. X    else {
  2031. X    return &errmsg ("Wrong argument for PACK");
  2032. X    }
  2033. X    1;
  2034. X}
  2035. X
  2036. X################ search <item> [ <item>...] ################
  2037. X
  2038. Xsub cmd_search {
  2039. X    return &errmsg ("Usage: $cmd item [ item ... ]") unless @cmd > 0;
  2040. X
  2041. X    foreach $item ( @cmd ) {
  2042. X    if ( $item =~ m:(^\.|/\.|[*?%]): ) {
  2043. X        return &errmsg ("Illegal request");
  2044. X    }
  2045. X    push (@searchq, $curdir.$item);
  2046. X    print STDOUT "=> Search: $curdir$item\n";
  2047. X    }
  2048. X    1;
  2049. X}
  2050. X
  2051. X################ index ################
  2052. X
  2053. Xsub cmd_index {
  2054. X    return 0 unless @cmd == 0 || defined $indexfile;
  2055. X
  2056. X    if ( @cmd == 0 ) {
  2057. X    return 1 unless &setdefaults;
  2058. X    push (@workq, &zp ("S", $curdir."INDEX")); 
  2059. X    print STDOUT "=> Send: ${curdir}INDEX\n";
  2060. X    }
  2061. X    elsif ( @cmd > 0 ) {
  2062. X    foreach $item ( @cmd ) {
  2063. X        if ( $item =~ m:(^\.|/\.|[*?%]): ) {
  2064. X        return &errmsg ("Illegal request");
  2065. X        }
  2066. X        push (@indexq, $curdir.$item);
  2067. X        print STDOUT "=> Index: $curdir$item\n";
  2068. X    }
  2069. X    }
  2070. X    else {
  2071. X    return &errmsg ("Usage: $cmd item [ item ... ]");
  2072. X    }
  2073. X    1;
  2074. X}
  2075. X
  2076. X################ help ################
  2077. X
  2078. Xsub cmd_help {
  2079. X    return &errmsg ("HELP does not take any arguments ".
  2080. X            "(but you'll get help anyway)")
  2081. X    if @cmd != 0;
  2082. X
  2083. X    if ( $interactive ) {
  2084. X    &help;
  2085. X    }
  2086. X    else {
  2087. X    print STDOUT ("=> Okay, I'll append some help ".
  2088. X              "at the end of this message\n");
  2089. X    $needhelp = 1;
  2090. X    }
  2091. X    1;
  2092. X}
  2093. X
  2094. X################ CWD ################
  2095. X
  2096. Xsub cmd_request {
  2097. X    if ( $cmd[0] =~ /^end$/i ) {
  2098. X    shift @cmd;
  2099. X    return &cmd_end;
  2100. X    }
  2101. X    &cmd_cwd;
  2102. X}
  2103. X
  2104. Xsub cmd_cwd {
  2105. X    if ( @cmd == 0 ) {
  2106. X    print STDOUT ("=> No current directory\n");
  2107. X    $curdir = "";
  2108. X    return 1;
  2109. X    }
  2110. X    elsif ( @cmd == 1 ) {
  2111. X    if ( $cmd[0] =~ m:(^\.|/\.|[*?%]): ) {
  2112. X        return &errmsg ("Illegal directory");
  2113. X    }
  2114. X
  2115. X    $curdir = $cmd[0];
  2116. X    print STDOUT ("=> Current directory = $curdir\n");
  2117. X    $curdir .= "/" 
  2118. X        unless $curdir =~ m|/$| || $curdir =~ /^\[.*\]$/;
  2119. X    }
  2120. X    else {
  2121. X    return &errmsg ("Usage: $cmd [ path ]");
  2122. X    }
  2123. X    1;
  2124. X}
  2125. X
  2126. X################ DIR ################
  2127. X
  2128. Xsub cmd_dir {
  2129. X    return &errmsg ("Usage: $cmd [filename]") if @cmd > 1;
  2130. X
  2131. X    local ($item) = $curdir . shift (@cmd);
  2132. X    if ( $item eq '' && $ftphost eq '' ) {
  2133. X    return &errmsg ("No current directory");
  2134. X    }
  2135. X
  2136. X    if ( $item =~ m:(^\.|/\.|[\047]): ) {
  2137. X    return &errmsg ("Illegal directory");
  2138. X    }
  2139. X
  2140. X    local ($ftphost) = $ftphost;
  2141. X    if ( $item =~ /:/ || $ftphost ) {
  2142. X    &check_ftp || return 1;
  2143. X    push (@workq, &zp ('G', 'O', $ftphost));
  2144. X    push (@workq, &zp ('G', 'D', $item));
  2145. X    }
  2146. X    else {
  2147. X    return 1 unless &setdefaults;
  2148. X    $item = $` if $item =~ m|/+$|;
  2149. X    push (@workq, &zp ('D', $item));
  2150. X    }
  2151. X
  2152. X    print STDOUT ("=> Dir: $item\n");
  2153. X    1;
  2154. X}
  2155. X
  2156. X################ FTP ################
  2157. X
  2158. Xsub cmd_ftp {
  2159. X    local ($subcmd);
  2160. X    ($subcmd = shift (@cmd)) =~ tr/A-Z/a-z/;
  2161. X
  2162. X    if ( $subcmd =~ /^[-\w]+\.[-\w.]*$/ ) {
  2163. X    unshift (@cmd, $subcmd);
  2164. X    $subcmd = "open";
  2165. X    }
  2166. X
  2167. X    if ( $subcmd eq "open" ) {
  2168. X    if ( @cmd != 1 ) {
  2169. X        return &errmsg ("Usage: $cmd $subcmd hostname");
  2170. X    }
  2171. X    &ftp_defaults (shift (@cmd)) || return 1;
  2172. X    }
  2173. X    elsif ( $subcmd eq "close" ) {
  2174. X    if ( @cmd > 0 ) {
  2175. X        return &errmsg ("Usage: $cmd $subcmd");
  2176. X    }
  2177. X    $ftphost = '';
  2178. X    push (@workq, &zp ('G', 'C'));
  2179. X    print STDOUT ("=> Okay\n");
  2180. X    }
  2181. X    elsif ( $subcmd eq "user" ) {
  2182. X    if ( @cmd == 0 || $cmd > 2 ) {
  2183. X        return &errmsg ("Usage: $cmd $subcmd login [password]");
  2184. X    }
  2185. X    push (@cmd, $recipient) if @cmd == 1;
  2186. X    push (@workq, &zp ('G', 'U', @cmd));
  2187. X    print STDOUT ("=> FTP Login: @cmd\n");
  2188. X    }
  2189. X    else {
  2190. X    return &errmsg ("Invalid $cmd subcommand: \"$subcmd\"");
  2191. X    }
  2192. X    1;
  2193. X}
  2194. X
  2195. X################ ARCHIE ################
  2196. X
  2197. X
  2198. X#        local ($flags) = '';
  2199. X#        local ($subcmd);
  2200. X#        local ($usage) = "Usage: archie [-cersl] [-mNN] arg";
  2201. X#        local ($arg) = pop (@cmd);
  2202. X#
  2203. X#        while ( @cmd ) {
  2204. X#        $subcmd = shift (@cmd);
  2205. X#        if ( $subcmd !~ /^-/ ) {
  2206. X#            &errmsg ($usage.1);
  2207. X#            next COMMAND_LOOP;
  2208. X#        }
  2209. X#        $subcmd = $';
  2210. X#        while ( $subcmd ) {
  2211. X#            if ( $subcmd =~ /^[cersl]/i ) {
  2212. X#            $flags .= " -\l$+";
  2213. X#            $subcmd = $';
  2214. X#            }
  2215. X#            elsif ( $subcmd =~ /^m\d+/i ) {
  2216. X#            $subcmd = $';
  2217. X#            $flags .= " -\l$+";
  2218. X#            }
  2219. X#            else {
  2220. X#            &errmsg ($usage.2);
  2221. X#            next COMMAND_LOOP;
  2222. X#            }
  2223. X#        }
  2224. X#        }
  2225. X#
  2226. X#        if ( $arg =~ /'";\\\s/ ) {
  2227. X#        &errmsg ("Invalid argument to Archie");
  2228. X#        next COMMAND_LOOP;
  2229. X#        }
  2230. X#        $flags =~ s/^\s+//;
  2231. X#        return 1 unless &setdefaults;
  2232. X#        push (@workq, &zp ('A', $arg, $flags));
  2233. X#        print STDOUT ("=> Archie: $flags $arg\n");
  2234. X#    }
  2235. X
  2236. Xsub cmd_archie {
  2237. X    local ($subtype);
  2238. X    local ($subcmd) = shift (@cmd);
  2239. X    local ($arg) = shift (@cmd);
  2240. X    local ($usage) = "Usage: ARCHIE PROG regexp";
  2241. X
  2242. X    if ( $subcmd =~ /^prog$/i ) {
  2243. X    $subtype = 'P';
  2244. X    }
  2245. X    else {
  2246. X    return &errmsg ($usage);
  2247. X    }
  2248. X
  2249. X#    if ( $arg =~ /'";\\\s/ ) {
  2250. X#    return &errmsg ("Invalid argument to Archie");
  2251. X#    }
  2252. X
  2253. X    return 1 unless &setdefaults;
  2254. X    push (@workq, &zp ('A', $subtype, $arg));
  2255. X    print STDOUT ("=> Archie: \L$subcmd\E $arg\n");
  2256. X    1;
  2257. X}
  2258. X
  2259. X################ test ################
  2260. X
  2261. Xsub cmd_test {
  2262. X    return 0 unless @cmd == 0;
  2263. X
  2264. X    $opt_noqueue = 1;
  2265. X    $didhelp = 1;
  2266. X    print STDOUT "=> Okay\n";
  2267. X    1;
  2268. X}
  2269. X
  2270. X################ subroutines ################
  2271. X
  2272. Xsub check_ftp {
  2273. X
  2274. X    # Check for implicit FTP in $item.
  2275. X    # Sets up FTP if allowed.
  2276. X    # Modifies $item if needed.
  2277. X
  2278. X    unless ( $ftp ) {
  2279. X    &errmsg ("Illegal request");
  2280. X    return 0;
  2281. X    }
  2282. X
  2283. X    if ( $ftphost ) {
  2284. X    if ( $item =~ /:/ ) {
  2285. X        if ( $` ne $ftphost) {
  2286. X        &errmsg ("Use FTP CLOSE before " .
  2287. X             "connecting to another host");
  2288. X        return 0;
  2289. X        }
  2290. X        $item = $';
  2291. X    }
  2292. X    return 1;
  2293. X    }
  2294. X
  2295. X    $item = $';
  2296. X    return &ftp_defaults ($`);
  2297. X}
  2298. X
  2299. X################ 1 ################
  2300. X1;
  2301. END_OF_FILE
  2302.   if test 17491 -ne `wc -c <'mserv-3.1/pr_parse.pl'`; then
  2303.     echo shar: \"'mserv-3.1/pr_parse.pl'\" unpacked with wrong size!
  2304.   fi
  2305.   # end of 'mserv-3.1/pr_parse.pl'
  2306. fi
  2307. echo shar: End of archive 4 \(of 6\).
  2308. cp /dev/null ark4isdone
  2309. MISSING=""
  2310. for I in 1 2 3 4 5 6 ; do
  2311.     if test ! -f ark${I}isdone ; then
  2312.     MISSING="${MISSING} ${I}"
  2313.     fi
  2314. done
  2315. if test "${MISSING}" = "" ; then
  2316.     echo You have unpacked all 6 archives.
  2317.     rm -f ark[1-9]isdone
  2318. else
  2319.     echo You still must unpack the following archives:
  2320.     echo "        " ${MISSING}
  2321. fi
  2322. exit 0
  2323. exit 0 # Just in case...
  2324.