home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sources / misc / 4237 < prev    next >
Encoding:
Text File  |  1993-01-06  |  59.7 KB  |  2,330 lines

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