home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume41 / mailagnt / part25 < prev    next >
Encoding:
Text File  |  1993-12-03  |  53.7 KB  |  1,628 lines

  1. Newsgroups: comp.sources.misc
  2. From: Raphael Manfredi <ram@acri.fr>
  3. Subject: v41i025:  mailagent - Flexible mail filtering and processing package, v3.0, Part25/26
  4. Message-ID: <1993Dec3.213703.23427@sparky.sterling.com>
  5. X-Md4-Signature: bbb21db19e51237a906ff53c132f32e4
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Advanced Computer Research Institute, Lyon, France.
  8. Date: Fri, 3 Dec 1993 21:37:03 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: Raphael Manfredi <ram@acri.fr>
  12. Posting-number: Volume 41, Issue 25
  13. Archive-name: mailagent/part25
  14. Environment: UNIX, Perl
  15. Supersedes: mailagent: Volume 33, Issue 93-109
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  22. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  23. # Contents:  agent/README agent/examples/daemon
  24. #   agent/examples/mailfolders agent/examples/mhinc
  25. #   agent/examples/nocmds agent/examples/vacation
  26. #   agent/files/Jmakefile agent/files/commands agent/files/distribs
  27. #   agent/files/help/README agent/files/passwd agent/filter/msg.h
  28. #   agent/man/Jmakefile agent/pl/actions.pl.02 agent/pl/fatal.pl
  29. #   agent/pl/gensym.pl agent/pl/q.pl agent/pl/tilde.pl
  30. #   agent/test/cmd/abort.t agent/test/cmd/delete.t
  31. #   agent/test/cmd/feed.t agent/test/cmd/macro.t agent/test/cmd/nop.t
  32. #   agent/test/cmd/process.t agent/test/cmd/queue.t
  33. #   agent/test/cmd/resync.t agent/test/cmd/run.t
  34. #   agent/test/cmd/server.t agent/test/cmd/subst.t agent/test/cmd/tr.t
  35. #   agent/test/filter/escape.t agent/test/option/L.t
  36. #   agent/test/option/V.t agent/test/option/h.t agent/test/option/o.t
  37. #   agent/test/option/r.t agent/test/option/what.t
  38. #   agent/test/pl/init.pl agent/test/pl/misc.pl agent/test/pl/mta.pl
  39. #   confmagic.h misc/shell/README misc/unkit/README
  40. #   misc/unkit/mailagent.cf
  41. # Wrapped by ram@soft208 on Mon Nov 29 16:49:58 1993
  42. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  43. echo If this archive is complete, you will see the following message:
  44. echo '          "shar: End of archive 25 (of 26)."'
  45. if test -f 'agent/README' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'agent/README'\"
  47. else
  48.   echo shar: Extracting \"'agent/README'\" \(930 characters\)
  49.   sed "s/^X//" >'agent/README' <<'END_OF_FILE'
  50. XThis is the root directory for mailagent.
  51. X
  52. XIf you choose to install the mailagent, you will enable people to
  53. Xask for patches and eventually distributions. You need kit 2.0
  54. X(at least PL 9) and cshar 3.0 for the mailagent's PROCESS command to
  55. Xwork properly. If you miss one of those, you can request them from my
  56. Xown mailagent.
  57. X
  58. XYou will also have access to filtering abilities, specified using
  59. Xlex-like rules. The mailagent will delete all those mails you do not
  60. Xwish to read, forward others (e.g. rebroadcasting a mailing list),
  61. Xand file mail into folders for delayed reading.
  62. X
  63. XInstructions for configuring and setting your mailagent are found
  64. Xin the manual page. Once all is installed, run "man mailagent".
  65. XYou can also go to the man/ subdirectory and run the following:
  66. X"nroff -man mailagent.1 | more -s".
  67. X
  68. XLook at the README file in the filter/ directory for hints on choosing
  69. Xbetween the C or the shell version of the filter.
  70. END_OF_FILE
  71.   if test 930 -ne `wc -c <'agent/README'`; then
  72.     echo shar: \"'agent/README'\" unpacked with wrong size!
  73.   fi
  74.   # end of 'agent/README'
  75. fi
  76. if test -f 'agent/examples/daemon' -a "${1}" != "-c" ; then 
  77.   echo shar: Will not clobber existing file \"'agent/examples/daemon'\"
  78. else
  79.   echo shar: Extracting \"'agent/examples/daemon'\" \(298 characters\)
  80.   sed "s/^X//" >'agent/examples/daemon' <<'END_OF_FILE'
  81. X#
  82. X# Rule file for mailagent
  83. X#
  84. X
  85. Xmaildir = ~/mail;
  86. X
  87. XTo Cc: ram        { BEGIN RAM; REJECT };
  88. X
  89. X<RAM> From: root, mailer-daemon, uucp    { BEGIN INITIAL; REJECT };
  90. X<RAM> { ONCE (%r,vacation,1d) MESSAGE ~/.vacation; REJECT };
  91. X
  92. X{ LEAVE; BOUNCE ram@eiffel.fr };
  93. X
  94. X<_SEEN_>    { DELETE };
  95. X
  96. X#
  97. X# End of mailagent rules
  98. X#
  99. END_OF_FILE
  100.   if test 298 -ne `wc -c <'agent/examples/daemon'`; then
  101.     echo shar: \"'agent/examples/daemon'\" unpacked with wrong size!
  102.   fi
  103.   # end of 'agent/examples/daemon'
  104. fi
  105. if test -f 'agent/examples/mailfolders' -a "${1}" != "-c" ; then 
  106.   echo shar: Will not clobber existing file \"'agent/examples/mailfolders'\"
  107. else
  108.   echo shar: Extracting \"'agent/examples/mailfolders'\" \(249 characters\)
  109.   sed "s/^X//" >'agent/examples/mailfolders' <<'END_OF_FILE'
  110. X#
  111. X# Folders which should be scanned by ksh for new mail
  112. X#
  113. X~/mail/ftp.mail
  114. X~/mail/cmds
  115. X~/mbox.filter
  116. X~/mbox.urgent
  117. X~/mail/gue
  118. X~/mail/comp.mail.mh
  119. X~/mail/unix-src
  120. X~/mail/unix-wiz
  121. X~/mail/admin
  122. X~/mail/ise
  123. X~/mail/rdb
  124. X~/mail/dist
  125. X~/mail/frog
  126. X~/mail/magic
  127. END_OF_FILE
  128.   if test 249 -ne `wc -c <'agent/examples/mailfolders'`; then
  129.     echo shar: \"'agent/examples/mailfolders'\" unpacked with wrong size!
  130.   fi
  131.   # end of 'agent/examples/mailfolders'
  132. fi
  133. if test -f 'agent/examples/mhinc' -a "${1}" != "-c" ; then 
  134.   echo shar: Will not clobber existing file \"'agent/examples/mhinc'\"
  135. else
  136.   echo shar: Extracting \"'agent/examples/mhinc'\" \(676 characters\)
  137.   sed "s/^X//" >'agent/examples/mhinc' <<'END_OF_FILE'
  138. X#! /bin/sh
  139. X# @(#) incorporates mail in an mh folder from a mail/news folder
  140. X
  141. Xif test $# -eq 0; then
  142. X    exec inc
  143. Xfi
  144. X
  145. Xif folder="$HOME/mail/$1" && test -s $folder; then
  146. X    :
  147. Xelif folder="$HOME/news/$1" && test -s $folder; then
  148. X    :
  149. Xelse
  150. X    echo "mhinc: no mail to incorporate"
  151. X    exit 0
  152. Xfi
  153. X
  154. Xif test -d $folder; then
  155. X    echo "mhinc: $folder is a directory!"
  156. X    exit 0
  157. Xfi
  158. X
  159. Xecho "mhinc: using $folder"
  160. Xinc +$1 -file $folder -truncate
  161. X
  162. X# Do not leave zero-length files. This may lead to some trouble when
  163. X# saving news articles in them (trn will not recognize the "mailbox"
  164. X# format, which is required by inc).
  165. X
  166. Xif test -s $folder; then
  167. X    echo "mhinc: folder was not emptied"
  168. Xelse
  169. X    rm $folder
  170. Xfi
  171. X
  172. END_OF_FILE
  173.   if test 676 -ne `wc -c <'agent/examples/mhinc'`; then
  174.     echo shar: \"'agent/examples/mhinc'\" unpacked with wrong size!
  175.   fi
  176.   chmod +x 'agent/examples/mhinc'
  177.   # end of 'agent/examples/mhinc'
  178. fi
  179. if test -f 'agent/examples/nocmds' -a "${1}" != "-c" ; then 
  180.   echo shar: Will not clobber existing file \"'agent/examples/nocmds'\"
  181. else
  182.   echo shar: Extracting \"'agent/examples/nocmds'\" \(610 characters\)
  183.   sed "s/^X//" >'agent/examples/nocmds' <<'END_OF_FILE'
  184. X[This is a recording -- Last revision was made on %T]
  185. X
  186. XDear %N:
  187. X
  188. XI have received your command mail dated %[Date].
  189. X
  190. XI am truly sorry, but the mailagent access has been denied to you for various
  191. Xreasons. Your mail however was not lost but filtered normally, which means
  192. XI will have a look at it. I may eventually execute the command myself, if
  193. Xnecessary and needed.
  194. X
  195. XThank you for your understanding.
  196. X--
  197. XRaphael Manfredi <ram@acri.fr>
  198. XAdvanced Computer Research Institute
  199. X1, boulevard Marius Vivier-Merle              / Tel +33 72-35-80-55 \
  200. X69443 Lyon Cedex 03, FRANCE                   \ Fax +33 72-35-84-10 /
  201. END_OF_FILE
  202.   if test 610 -ne `wc -c <'agent/examples/nocmds'`; then
  203.     echo shar: \"'agent/examples/nocmds'\" unpacked with wrong size!
  204.   fi
  205.   # end of 'agent/examples/nocmds'
  206. fi
  207. if test -f 'agent/examples/vacation' -a "${1}" != "-c" ; then 
  208.   echo shar: Will not clobber existing file \"'agent/examples/vacation'\"
  209. else
  210.   echo shar: Extracting \"'agent/examples/vacation'\" \(457 characters\)
  211.   sed "s/^X//" >'agent/examples/vacation' <<'END_OF_FILE'
  212. XSubject: This is a recording... [Re: %R]
  213. XOrganization: %o
  214. X
  215. X[This is a recording -- Last revision was made on %T (month/day)]
  216. X
  217. XHello %N:
  218. X
  219. XI have received your message of %[Date], whose subject
  220. Xwas "%s" and dropped it into one
  221. Xof %u's mailbox. I will send you such an acknowledgment only once a day.
  222. X(Your mail was received by a program, not by a person, in case you wonder.)
  223. X
  224. X%U told me:
  225. X
  226. XSuitable vacation message goes here...
  227. X
  228. X-- mailagent speaking for %u
  229. END_OF_FILE
  230.   if test 457 -ne `wc -c <'agent/examples/vacation'`; then
  231.     echo shar: \"'agent/examples/vacation'\" unpacked with wrong size!
  232.   fi
  233.   # end of 'agent/examples/vacation'
  234. fi
  235. if test -f 'agent/files/Jmakefile' -a "${1}" != "-c" ; then 
  236.   echo shar: Will not clobber existing file \"'agent/files/Jmakefile'\"
  237. else
  238.   echo shar: Extracting \"'agent/files/Jmakefile'\" \(867 characters\)
  239.   sed "s/^X//" >'agent/files/Jmakefile' <<'END_OF_FILE'
  240. X/*
  241. X * Jmakefile for mailagent's files
  242. X */
  243. X
  244. X;# $Id: Jmakefile,v 3.0 1993/11/29 13:47:46 ram Exp ram $
  245. X;#
  246. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  247. X;#  
  248. X;#  You may redistribute only under the terms of the Artistic License,
  249. X;#  as specified in the README file that comes with the distribution.
  250. X;#  You may reuse parts of this distribution only within the terms of
  251. X;#  that same Artistic License; a copy of which may be found at the root
  252. X;#  of the source tree for mailagent 3.0.
  253. X;#
  254. X;# $Log: Jmakefile,v $
  255. X;# Revision 3.0  1993/11/29  13:47:46  ram
  256. X;# Baseline for mailagent 3.0 netwide release.
  257. X;#
  258. X
  259. XFILES = agenthelp commands distribs filter.sh mailagent.cf proglist \
  260. X    chkagent.sh
  261. X
  262. X>PRIVLIB    /* Force metaconfig to ask for privlib location */
  263. X
  264. Xall::
  265. X
  266. XMakeInstallDirectories($(PRIVLIB))
  267. XInstallMultipleDestFlags(install,$(FILES),$(PRIVLIB),-m 444)
  268. X
  269. XSetSubdirs(help)
  270. END_OF_FILE
  271.   if test 867 -ne `wc -c <'agent/files/Jmakefile'`; then
  272.     echo shar: \"'agent/files/Jmakefile'\" unpacked with wrong size!
  273.   fi
  274.   # end of 'agent/files/Jmakefile'
  275. fi
  276. if test -f 'agent/files/commands' -a "${1}" != "-c" ; then 
  277.   echo shar: Will not clobber existing file \"'agent/files/commands'\"
  278. else
  279.   echo shar: Extracting \"'agent/files/commands'\" \(45 characters\)
  280.   sed "s/^X//" >'agent/files/commands' <<'END_OF_FILE'
  281. Xmailpatch
  282. Xmailhelp
  283. Xmaillist
  284. Xmaildist
  285. Xpackage
  286. END_OF_FILE
  287.   if test 45 -ne `wc -c <'agent/files/commands'`; then
  288.     echo shar: \"'agent/files/commands'\" unpacked with wrong size!
  289.   fi
  290.   # end of 'agent/files/commands'
  291. fi
  292. if test -f 'agent/files/distribs' -a "${1}" != "-c" ; then 
  293.   echo shar: Will not clobber existing file \"'agent/files/distribs'\"
  294. else
  295.   echo shar: Extracting \"'agent/files/distribs'\" \(807 characters\)
  296.   sed "s/^X//" >'agent/files/distribs' <<'END_OF_FILE'
  297. X# Distributions (under vi, use ':set ts=4')
  298. X
  299. X# prog version         path                  archiv    .Z patches
  300. X
  301. Xkit        1.0        ~/home/projects/kit            n    n    o
  302. Xkit        2.0        ~/home/projects/kit            n    n    y
  303. Xdist    2.0        ~/home/projects/dist        n    n    y
  304. Xmatrix    1.1        ~/home/projects/matrix        n    n    y
  305. Xcshar    3.0        ~/home/projects/cshar-3.0    n    n    y
  306. Xfile    ---        ~/arch/dist/file            y    y    n
  307. Xrcs        5.5        ~/arch/dist/rcs-5.5            y    y    n
  308. Xcops    ---        ~/arch/dist/cops            y    y    n
  309. Xflex    2.3        ~/arch/dist/flex2.3            y    y    n
  310. Xxfmt    ---        ~/arch/dist/xfmt            y    y    n
  311. Xet        ---        ~/arch/dist/et                y    y    n
  312. Xless    123        ~/arch/dist/less            y    y    n
  313. Xundel    2.0        ~/arch/dist/undel2            y    y    n
  314. Xperl    3.0        ~/arch/dist/perl-3.0        n    n    n
  315. Xperl    4.0        ~/arch/dist/perl-4.0        n    n    p
  316. Xpatch    2.0        ~/arch/dist/patch            y    y    n
  317. X
  318. X#rcs    4.3        ~/arch/dist/rcs.4_3            y    y    n
  319. X#undel    1.0        ~/arch/dist/UNDEL            y    y    n
  320. X#dither    1.0        ~/arch/dist/DITHER            y    y    y
  321. END_OF_FILE
  322.   if test 807 -ne `wc -c <'agent/files/distribs'`; then
  323.     echo shar: \"'agent/files/distribs'\" unpacked with wrong size!
  324.   fi
  325.   # end of 'agent/files/distribs'
  326. fi
  327. if test -f 'agent/files/help/README' -a "${1}" != "-c" ; then 
  328.   echo shar: Will not clobber existing file \"'agent/files/help/README'\"
  329. else
  330.   echo shar: Extracting \"'agent/files/help/README'\" \(67 characters\)
  331.   sed "s/^X//" >'agent/files/help/README' <<'END_OF_FILE'
  332. XThis directory contains help files for mailagent's SERVER command.
  333. END_OF_FILE
  334.   if test 67 -ne `wc -c <'agent/files/help/README'`; then
  335.     echo shar: \"'agent/files/help/README'\" unpacked with wrong size!
  336.   fi
  337.   # end of 'agent/files/help/README'
  338. fi
  339. if test -f 'agent/files/passwd' -a "${1}" != "-c" ; then 
  340.   echo shar: Will not clobber existing file \"'agent/files/passwd'\"
  341. else
  342.   echo shar: Extracting \"'agent/files/passwd'\" \(409 characters\)
  343.   sed "s/^X//" >'agent/files/passwd' <<'END_OF_FILE'
  344. Xroot:*:                    Super user, may do almost anything
  345. Xsecurity:*:                Security password for critical requests
  346. Xsystem:<system>:        May add/delete powers, edit config files
  347. Xmail:<mail>:            To work on mail messages in folders (from maildir)
  348. Xlist:<list>:            May perform administration on mailing lists
  349. Xshell:*:                Shell clearance needed to execute shell commands
  350. Xfile:*:                    File clearance needed to retrieve arbitrary files
  351. END_OF_FILE
  352.   if test 409 -ne `wc -c <'agent/files/passwd'`; then
  353.     echo shar: \"'agent/files/passwd'\" unpacked with wrong size!
  354.   fi
  355.   # end of 'agent/files/passwd'
  356. fi
  357. if test -f 'agent/filter/msg.h' -a "${1}" != "-c" ; then 
  358.   echo shar: Will not clobber existing file \"'agent/filter/msg.h'\"
  359. else
  360.   echo shar: Extracting \"'agent/filter/msg.h'\" \(937 characters\)
  361.   sed "s/^X//" >'agent/filter/msg.h' <<'END_OF_FILE'
  362. X/*
  363. X
  364. X #    #   ####    ####           #    #
  365. X ##  ##  #       #    #          #    #
  366. X # ## #   ####   #               ######
  367. X #    #       #  #  ###   ###    #    #
  368. X #    #  #    #  #    #   ###    #    #
  369. X #    #   ####    ####    ###    #    #
  370. X
  371. X    Declaration of message related functions.
  372. X*/
  373. X
  374. X/*
  375. X * $Id: msg.h,v 3.0 1993/11/29 13:48:17 ram Exp ram $
  376. X *
  377. X *  Copyright (c) 1990-1993, Raphael Manfredi
  378. X *  
  379. X *  You may redistribute only under the terms of the Artistic License,
  380. X *  as specified in the README file that comes with the distribution.
  381. X *  You may reuse parts of this distribution only within the terms of
  382. X *  that same Artistic License; a copy of which may be found at the root
  383. X *  of the source tree for mailagent 3.0.
  384. X *
  385. X * $Log: msg.h,v $
  386. X * Revision 3.0  1993/11/29  13:48:17  ram
  387. X * Baseline for mailagent 3.0 netwide release.
  388. X *
  389. X */
  390. X
  391. X#ifndef _msg_h_
  392. X#define _msg_h_
  393. X
  394. Xextern void fatal();                /* For fatal errors */
  395. X
  396. X#endif
  397. END_OF_FILE
  398.   if test 937 -ne `wc -c <'agent/filter/msg.h'`; then
  399.     echo shar: \"'agent/filter/msg.h'\" unpacked with wrong size!
  400.   fi
  401.   # end of 'agent/filter/msg.h'
  402. fi
  403. if test -f 'agent/man/Jmakefile' -a "${1}" != "-c" ; then 
  404.   echo shar: Will not clobber existing file \"'agent/man/Jmakefile'\"
  405. else
  406.   echo shar: Extracting \"'agent/man/Jmakefile'\" \(798 characters\)
  407.   sed "s/^X//" >'agent/man/Jmakefile' <<'END_OF_FILE'
  408. X/*
  409. X * Jmakefile for mailagent's manual pages
  410. X */
  411. X
  412. X;# $Id: Jmakefile,v 3.0 1993/11/29 13:48:25 ram Exp ram $
  413. X;#
  414. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  415. X;#  
  416. X;#  You may redistribute only under the terms of the Artistic License,
  417. X;#  as specified in the README file that comes with the distribution.
  418. X;#  You may reuse parts of this distribution only within the terms of
  419. X;#  that same Artistic License; a copy of which may be found at the root
  420. X;#  of the source tree for mailagent 3.0.
  421. X;#
  422. X;# $Log: Jmakefile,v $
  423. X;# Revision 3.0  1993/11/29  13:48:25  ram
  424. X;# Baseline for mailagent 3.0 netwide release.
  425. X;#
  426. X
  427. X>L        /* I expect to fix this with an |append command */
  428. X
  429. XMPAGES = mailagent.$(L) maildist.$(L) maillist.$(L) mailhelp.$(L) \
  430. X    mailpatch.$(L) package.$(L)
  431. X
  432. XComplexShellManualTarget($(MPAGES))
  433. END_OF_FILE
  434.   if test 798 -ne `wc -c <'agent/man/Jmakefile'`; then
  435.     echo shar: \"'agent/man/Jmakefile'\" unpacked with wrong size!
  436.   fi
  437.   # end of 'agent/man/Jmakefile'
  438. fi
  439. if test -f 'agent/pl/actions.pl.02' -a "${1}" != "-c" ; then 
  440.   echo shar: Will not clobber existing file \"'agent/pl/actions.pl.02'\"
  441. else
  442.   echo shar: Extracting \"'agent/pl/actions.pl.02'\" \(471 characters\)
  443.   sed "s/^X//" >'agent/pl/actions.pl.02' <<'END_OF_FILE'
  444. X# Check body message (typically head of digest message) and return 1 if its
  445. X# body is empty, 0 otherwise.
  446. Xsub empty_body {
  447. X    local(*ary) = @_;
  448. X    local(@array) = @ary;        # Work on a copy
  449. X    local($_);
  450. X    local($is_empty) = 1;
  451. X    do {
  452. X        $_ = pop(@array);        # Remove what belongs to next digest item
  453. X    } while !/^---/;
  454. X    do {
  455. X        $_ = shift(@array);        # Remove the whole header
  456. X    } while !/^$/;
  457. X    foreach (@array) {
  458. X        $is_empty = 0 unless /^\s*$/;
  459. X        last unless $is_empty;
  460. X    }
  461. X    $is_empty;
  462. X}
  463. X
  464. END_OF_FILE
  465.   if test 471 -ne `wc -c <'agent/pl/actions.pl.02'`; then
  466.     echo shar: \"'agent/pl/actions.pl.02'\" unpacked with wrong size!
  467.   fi
  468.   # end of 'agent/pl/actions.pl.02'
  469. fi
  470. if test -f 'agent/pl/fatal.pl' -a "${1}" != "-c" ; then 
  471.   echo shar: Will not clobber existing file \"'agent/pl/fatal.pl'\"
  472. else
  473.   echo shar: Extracting \"'agent/pl/fatal.pl'\" \(928 characters\)
  474.   sed "s/^X//" >'agent/pl/fatal.pl' <<'END_OF_FILE'
  475. X;# $Id: fatal.pl,v 3.0 1993/11/29 13:48:45 ram Exp ram $
  476. X;#
  477. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  478. X;#  
  479. X;#  You may redistribute only under the terms of the Artistic License,
  480. X;#  as specified in the README file that comes with the distribution.
  481. X;#  You may reuse parts of this distribution only within the terms of
  482. X;#  that same Artistic License; a copy of which may be found at the root
  483. X;#  of the source tree for mailagent 3.0.
  484. X;#
  485. X;# $Log: fatal.pl,v $
  486. X;# Revision 3.0  1993/11/29  13:48:45  ram
  487. X;# Baseline for mailagent 3.0 netwide release.
  488. X;#
  489. X;#
  490. X# In case of fatal error, the program does not simply die
  491. X# but also records the failure in the log.
  492. Xsub fatal {
  493. X    local($reason) = @_;            # Why did we get here ?
  494. X    &add_log("FAILED ($reason)") if $loglvl > 0;
  495. X    die "$prog_name: $reason\n";
  496. X}
  497. X
  498. X# Emergency signal was caught
  499. Xsub emergency {
  500. X    local($sig) = @_;            # First argument is signal name
  501. X    &fatal("trapped SIG$sig");
  502. X}
  503. X
  504. END_OF_FILE
  505.   if test 928 -ne `wc -c <'agent/pl/fatal.pl'`; then
  506.     echo shar: \"'agent/pl/fatal.pl'\" unpacked with wrong size!
  507.   fi
  508.   # end of 'agent/pl/fatal.pl'
  509. fi
  510. if test -f 'agent/pl/gensym.pl' -a "${1}" != "-c" ; then 
  511.   echo shar: Will not clobber existing file \"'agent/pl/gensym.pl'\"
  512. else
  513.   echo shar: Extracting \"'agent/pl/gensym.pl'\" \(735 characters\)
  514.   sed "s/^X//" >'agent/pl/gensym.pl' <<'END_OF_FILE'
  515. X;# $Id: gensym.pl,v 3.0 1993/11/29 13:48:48 ram Exp ram $
  516. X;#
  517. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  518. X;#  
  519. X;#  You may redistribute only under the terms of the Artistic License,
  520. X;#  as specified in the README file that comes with the distribution.
  521. X;#  You may reuse parts of this distribution only within the terms of
  522. X;#  that same Artistic License; a copy of which may be found at the root
  523. X;#  of the source tree for mailagent 3.0.
  524. X;#
  525. X;# $Log: gensym.pl,v $
  526. X;# Revision 3.0  1993/11/29  13:48:48  ram
  527. X;# Baseline for mailagent 3.0 netwide release.
  528. X;#
  529. X;# 
  530. X# Create a new symbol name each time it is invoked. That name is suitable for
  531. X# usage as a perl variable name.
  532. Xsub gensym {
  533. X    $Gensym = 'AAAAA' unless $Gensym;
  534. X    $Gensym++;
  535. X}
  536. X
  537. END_OF_FILE
  538.   if test 735 -ne `wc -c <'agent/pl/gensym.pl'`; then
  539.     echo shar: \"'agent/pl/gensym.pl'\" unpacked with wrong size!
  540.   fi
  541.   # end of 'agent/pl/gensym.pl'
  542. fi
  543. if test -f 'agent/pl/q.pl' -a "${1}" != "-c" ; then 
  544.   echo shar: Will not clobber existing file \"'agent/pl/q.pl'\"
  545. else
  546.   echo shar: Extracting \"'agent/pl/q.pl'\" \(634 characters\)
  547.   sed "s/^X//" >'agent/pl/q.pl' <<'END_OF_FILE'
  548. X;# $Id: q.pl,v 3.0 1993/11/29 13:49:10 ram Exp ram $
  549. X;#
  550. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  551. X;#  
  552. X;#  You may redistribute only under the terms of the Artistic License,
  553. X;#  as specified in the README file that comes with the distribution.
  554. X;#  You may reuse parts of this distribution only within the terms of
  555. X;#  that same Artistic License; a copy of which may be found at the root
  556. X;#  of the source tree for mailagent 3.0.
  557. X;#
  558. X;# $Log: q.pl,v $
  559. X;# Revision 3.0  1993/11/29  13:49:10  ram
  560. X;# Baseline for mailagent 3.0 netwide release.
  561. X;#
  562. X# Quotation removal routine
  563. Xsub q {
  564. X    local($_) = @_;
  565. X    local($*) = 1;
  566. X    s/^://g;
  567. X    $_;
  568. X}
  569. X
  570. END_OF_FILE
  571.   if test 634 -ne `wc -c <'agent/pl/q.pl'`; then
  572.     echo shar: \"'agent/pl/q.pl'\" unpacked with wrong size!
  573.   fi
  574.   # end of 'agent/pl/q.pl'
  575. fi
  576. if test -f 'agent/pl/tilde.pl' -a "${1}" != "-c" ; then 
  577.   echo shar: Will not clobber existing file \"'agent/pl/tilde.pl'\"
  578. else
  579.   echo shar: Extracting \"'agent/pl/tilde.pl'\" \(835 characters\)
  580.   sed "s/^X//" >'agent/pl/tilde.pl' <<'END_OF_FILE'
  581. X;# $Id: tilde.pl,v 3.0 1993/11/29 13:49:18 ram Exp ram $
  582. X;#
  583. X;#  Copyright (c) 1990-1993, Raphael Manfredi
  584. X;#  
  585. X;#  You may redistribute only under the terms of the Artistic License,
  586. X;#  as specified in the README file that comes with the distribution.
  587. X;#  You may reuse parts of this distribution only within the terms of
  588. X;#  that same Artistic License; a copy of which may be found at the root
  589. X;#  of the source tree for mailagent 3.0.
  590. X;#
  591. X;# $Log: tilde.pl,v $
  592. X;# Revision 3.0  1993/11/29  13:49:18  ram
  593. X;# Baseline for mailagent 3.0 netwide release.
  594. X;#
  595. X;#
  596. X# Perform ~name expansion ala ksh...
  597. X# (banish csh from your vocabulary ;-)
  598. Xsub tilda_expand {
  599. X    local($path) = @_;
  600. X    return $path unless $path =~ /^~/;
  601. X    $path =~ s:^~([^/]+):(getpwnam($1))[$[+7]:e;            # ~name
  602. X    $path =~ s:^~:$ENV{'HOME'} || (getpwuid($<))[$[+7]:e;    # ~
  603. X    $path;
  604. X}
  605. X
  606. END_OF_FILE
  607.   if test 835 -ne `wc -c <'agent/pl/tilde.pl'`; then
  608.     echo shar: \"'agent/pl/tilde.pl'\" unpacked with wrong size!
  609.   fi
  610.   # end of 'agent/pl/tilde.pl'
  611. fi
  612. if test -f 'agent/test/cmd/abort.t' -a "${1}" != "-c" ; then 
  613.   echo shar: Will not clobber existing file \"'agent/test/cmd/abort.t'\"
  614. else
  615.   echo shar: Extracting \"'agent/test/cmd/abort.t'\" \(850 characters\)
  616.   sed "s/^X//" >'agent/test/cmd/abort.t' <<'END_OF_FILE'
  617. X# Test ABORT command
  618. X
  619. X# $Id: abort.t,v 3.0 1993/11/29 13:49:25 ram Exp ram $
  620. X#
  621. X#  Copyright (c) 1990-1993, Raphael Manfredi
  622. X#  
  623. X#  You may redistribute only under the terms of the Artistic License,
  624. X#  as specified in the README file that comes with the distribution.
  625. X#  You may reuse parts of this distribution only within the terms of
  626. X#  that same Artistic License; a copy of which may be found at the root
  627. X#  of the source tree for mailagent 3.0.
  628. X#
  629. X# $Log: abort.t,v $
  630. X# Revision 3.0  1993/11/29  13:49:25  ram
  631. X# Baseline for mailagent 3.0 netwide release.
  632. X#
  633. X
  634. Xdo '../pl/cmd.pl';
  635. Xunlink "$user.1", 'always';
  636. X
  637. X&add_header('X-Tag: abort');
  638. X`$cmd`;
  639. X$? == 0 || print "1\n";
  640. X-f "$user.1" && print "2\n";    # Have aborted
  641. X-f "$user" && print "3\n";        # match -> no leave
  642. X-f 'always' || print "4\n";
  643. X
  644. Xunlink "$user", "$user.1", 'always', 'mail';
  645. Xprint "0\n";
  646. END_OF_FILE
  647.   if test 850 -ne `wc -c <'agent/test/cmd/abort.t'`; then
  648.     echo shar: \"'agent/test/cmd/abort.t'\" unpacked with wrong size!
  649.   fi
  650.   # end of 'agent/test/cmd/abort.t'
  651. fi
  652. if test -f 'agent/test/cmd/delete.t' -a "${1}" != "-c" ; then 
  653.   echo shar: Will not clobber existing file \"'agent/test/cmd/delete.t'\"
  654. else
  655.   echo shar: Extracting \"'agent/test/cmd/delete.t'\" \(719 characters\)
  656.   sed "s/^X//" >'agent/test/cmd/delete.t' <<'END_OF_FILE'
  657. X# Test DELETE command
  658. X
  659. X# $Id: delete.t,v 3.0 1993/11/29 13:49:30 ram Exp ram $
  660. X#
  661. X#  Copyright (c) 1990-1993, Raphael Manfredi
  662. X#  
  663. X#  You may redistribute only under the terms of the Artistic License,
  664. X#  as specified in the README file that comes with the distribution.
  665. X#  You may reuse parts of this distribution only within the terms of
  666. X#  that same Artistic License; a copy of which may be found at the root
  667. X#  of the source tree for mailagent 3.0.
  668. X#
  669. X# $Log: delete.t,v $
  670. X# Revision 3.0  1993/11/29  13:49:30  ram
  671. X# Baseline for mailagent 3.0 netwide release.
  672. X#
  673. X
  674. Xdo '../pl/cmd.pl';
  675. X
  676. X&add_header('X-Tag: delete');
  677. X`$cmd`;
  678. X$? == 0 || print "1\n";
  679. X-f "$user" && print "2\n";        # Mail deleted
  680. X
  681. Xunlink 'mail';
  682. Xprint "0\n";
  683. END_OF_FILE
  684.   if test 719 -ne `wc -c <'agent/test/cmd/delete.t'`; then
  685.     echo shar: \"'agent/test/cmd/delete.t'\" unpacked with wrong size!
  686.   fi
  687.   # end of 'agent/test/cmd/delete.t'
  688. fi
  689. if test -f 'agent/test/cmd/feed.t' -a "${1}" != "-c" ; then 
  690.   echo shar: Will not clobber existing file \"'agent/test/cmd/feed.t'\"
  691. else
  692.   echo shar: Extracting \"'agent/test/cmd/feed.t'\" \(924 characters\)
  693.   sed "s/^X//" >'agent/test/cmd/feed.t' <<'END_OF_FILE'
  694. X# Test FEED command
  695. X
  696. X# $Id: feed.t,v 3.0 1993/11/29 13:49:31 ram Exp ram $
  697. X#
  698. X#  Copyright (c) 1990-1993, Raphael Manfredi
  699. X#  
  700. X#  You may redistribute only under the terms of the Artistic License,
  701. X#  as specified in the README file that comes with the distribution.
  702. X#  You may reuse parts of this distribution only within the terms of
  703. X#  that same Artistic License; a copy of which may be found at the root
  704. X#  of the source tree for mailagent 3.0.
  705. X#
  706. X# $Log: feed.t,v $
  707. X# Revision 3.0  1993/11/29  13:49:31  ram
  708. X# Baseline for mailagent 3.0 netwide release.
  709. X#
  710. X
  711. Xdo '../pl/cmd.pl';
  712. Xunlink 'ok', 'no_resync';
  713. X
  714. X&add_header('X-Tag: feed');
  715. X`$cmd`;
  716. X$? == 0 || print "1\n";
  717. X-f "$user" && print "2\n";        # Mail saved...
  718. X-f 'ok' || print "3\n";            # ...here
  719. X&get_log(4, 'ok');
  720. X¬_log('^To:', 5);            # Make sure To: disappeared
  721. X-f 'no_resync' || print "6\n";    # Ensure header not disturbed
  722. X
  723. Xunlink 'ok', 'no_resync', 'mail';
  724. Xprint "0\n";
  725. END_OF_FILE
  726.   if test 924 -ne `wc -c <'agent/test/cmd/feed.t'`; then
  727.     echo shar: \"'agent/test/cmd/feed.t'\" unpacked with wrong size!
  728.   fi
  729.   # end of 'agent/test/cmd/feed.t'
  730. fi
  731. if test -f 'agent/test/cmd/macro.t' -a "${1}" != "-c" ; then 
  732.   echo shar: Will not clobber existing file \"'agent/test/cmd/macro.t'\"
  733. else
  734.   echo shar: Extracting \"'agent/test/cmd/macro.t'\" \(857 characters\)
  735.   sed "s/^X//" >'agent/test/cmd/macro.t' <<'END_OF_FILE'
  736. X# Test MACRO command
  737. X
  738. X# $Id: macro.t,v 3.0 1993/11/29 13:49:34 ram Exp ram $
  739. X#
  740. X#  Copyright (c) 1990-1993, Raphael Manfredi
  741. X#  
  742. X#  You may redistribute only under the terms of the Artistic License,
  743. X#  as specified in the README file that comes with the distribution.
  744. X#  You may reuse parts of this distribution only within the terms of
  745. X#  that same Artistic License; a copy of which may be found at the root
  746. X#  of the source tree for mailagent 3.0.
  747. X#
  748. X# $Log: macro.t,v $
  749. X# Revision 3.0  1993/11/29  13:49:34  ram
  750. X# Baseline for mailagent 3.0 netwide release.
  751. X#
  752. X
  753. Xdo '../pl/cmd.pl';
  754. Xunlink 'ok';
  755. X
  756. X&add_header('X-Tag: macro');
  757. X`$cmd`;
  758. X$? == 0 || print "1\n";
  759. X-f "$user" && print "2\n";        # Mail not saved
  760. X-f 'ok' || print "3\n";            # Output of /bin/echo
  761. X&get_log(4, 'ok');
  762. X&check_log('^It seems to work fine.', 5);        # It works
  763. X
  764. Xunlink 'ok', 'mail';
  765. Xprint "0\n";
  766. END_OF_FILE
  767.   if test 857 -ne `wc -c <'agent/test/cmd/macro.t'`; then
  768.     echo shar: \"'agent/test/cmd/macro.t'\" unpacked with wrong size!
  769.   fi
  770.   # end of 'agent/test/cmd/macro.t'
  771. fi
  772. if test -f 'agent/test/cmd/nop.t' -a "${1}" != "-c" ; then 
  773.   echo shar: Will not clobber existing file \"'agent/test/cmd/nop.t'\"
  774. else
  775.   echo shar: Extracting \"'agent/test/cmd/nop.t'\" \(745 characters\)
  776.   sed "s/^X//" >'agent/test/cmd/nop.t' <<'END_OF_FILE'
  777. X# The NOP command
  778. X
  779. X# $Id: nop.t,v 3.0 1993/11/29 13:49:35 ram Exp ram $
  780. X#
  781. X#  Copyright (c) 1990-1993, Raphael Manfredi
  782. X#  
  783. X#  You may redistribute only under the terms of the Artistic License,
  784. X#  as specified in the README file that comes with the distribution.
  785. X#  You may reuse parts of this distribution only within the terms of
  786. X#  that same Artistic License; a copy of which may be found at the root
  787. X#  of the source tree for mailagent 3.0.
  788. X#
  789. X# $Log: nop.t,v $
  790. X# Revision 3.0  1993/11/29  13:49:35  ram
  791. X# Baseline for mailagent 3.0 netwide release.
  792. X#
  793. X
  794. Xdo '../pl/cmd.pl';
  795. X
  796. X# Make sure NOP is recognized (not defaulted to LEAVE)
  797. X&add_header('X-Tag: nop');
  798. X`$cmd`;
  799. X$? == 0 || print "1\n";
  800. X-f "$user" && print "2\n";
  801. X
  802. Xunlink 'mail';
  803. Xprint "0\n";
  804. END_OF_FILE
  805.   if test 745 -ne `wc -c <'agent/test/cmd/nop.t'`; then
  806.     echo shar: \"'agent/test/cmd/nop.t'\" unpacked with wrong size!
  807.   fi
  808.   # end of 'agent/test/cmd/nop.t'
  809. fi
  810. if test -f 'agent/test/cmd/process.t' -a "${1}" != "-c" ; then 
  811.   echo shar: Will not clobber existing file \"'agent/test/cmd/process.t'\"
  812. else
  813.   echo shar: Extracting \"'agent/test/cmd/process.t'\" \(611 characters\)
  814.   sed "s/^X//" >'agent/test/cmd/process.t' <<'END_OF_FILE'
  815. X# The PROCESS command
  816. X
  817. X# $Id: process.t,v 3.0 1993/11/29 13:49:40 ram Exp ram $
  818. X#
  819. X#  Copyright (c) 1990-1993, Raphael Manfredi
  820. X#  
  821. X#  You may redistribute only under the terms of the Artistic License,
  822. X#  as specified in the README file that comes with the distribution.
  823. X#  You may reuse parts of this distribution only within the terms of
  824. X#  that same Artistic License; a copy of which may be found at the root
  825. X#  of the source tree for mailagent 3.0.
  826. X#
  827. X# $Log: process.t,v $
  828. X# Revision 3.0  1993/11/29  13:49:40  ram
  829. X# Baseline for mailagent 3.0 netwide release.
  830. X#
  831. X
  832. Xprint "-1\n";    # Automatic testing difficult
  833. END_OF_FILE
  834.   if test 611 -ne `wc -c <'agent/test/cmd/process.t'`; then
  835.     echo shar: \"'agent/test/cmd/process.t'\" unpacked with wrong size!
  836.   fi
  837.   # end of 'agent/test/cmd/process.t'
  838. fi
  839. if test -f 'agent/test/cmd/queue.t' -a "${1}" != "-c" ; then 
  840.   echo shar: Will not clobber existing file \"'agent/test/cmd/queue.t'\"
  841. else
  842.   echo shar: Extracting \"'agent/test/cmd/queue.t'\" \(909 characters\)
  843.   sed "s/^X//" >'agent/test/cmd/queue.t' <<'END_OF_FILE'
  844. X# Test QUEUE command
  845. X
  846. X# $Id: queue.t,v 3.0 1993/11/29 13:49:41 ram Exp ram $
  847. X#
  848. X#  Copyright (c) 1990-1993, Raphael Manfredi
  849. X#  
  850. X#  You may redistribute only under the terms of the Artistic License,
  851. X#  as specified in the README file that comes with the distribution.
  852. X#  You may reuse parts of this distribution only within the terms of
  853. X#  that same Artistic License; a copy of which may be found at the root
  854. X#  of the source tree for mailagent 3.0.
  855. X#
  856. X# $Log: queue.t,v $
  857. X# Revision 3.0  1993/11/29  13:49:41  ram
  858. X# Baseline for mailagent 3.0 netwide release.
  859. X#
  860. X
  861. Xdo '../pl/cmd.pl';
  862. X
  863. Xunlink <queue/*>;
  864. X
  865. X&add_header('X-Tag: queue');
  866. X`$cmd`;
  867. X$? == 0 || print "1\n";
  868. X-f "$user" && print "2\n";        # Mail queued -> saved
  869. X
  870. X@queue = <queue/qm*>;
  871. X@queue == 4 || print "3\n";
  872. X$size = -s 'mail';
  873. X$ok = 1;
  874. Xforeach (@queue) {
  875. X    $ok == 0 if $size != -s $_;
  876. X}
  877. X$ok || print "4\n";
  878. X
  879. Xunlink <queue/*>;
  880. Xunlink 'mail';
  881. Xprint "0\n";
  882. END_OF_FILE
  883.   if test 909 -ne `wc -c <'agent/test/cmd/queue.t'`; then
  884.     echo shar: \"'agent/test/cmd/queue.t'\" unpacked with wrong size!
  885.   fi
  886.   # end of 'agent/test/cmd/queue.t'
  887. fi
  888. if test -f 'agent/test/cmd/resync.t' -a "${1}" != "-c" ; then 
  889.   echo shar: Will not clobber existing file \"'agent/test/cmd/resync.t'\"
  890. else
  891.   echo shar: Extracting \"'agent/test/cmd/resync.t'\" \(913 characters\)
  892.   sed "s/^X//" >'agent/test/cmd/resync.t' <<'END_OF_FILE'
  893. X# The RESYNC command
  894. X
  895. X# $Id: resync.t,v 3.0 1993/11/29 13:49:46 ram Exp ram $
  896. X#
  897. X#  Copyright (c) 1990-1993, Raphael Manfredi
  898. X#  
  899. X#  You may redistribute only under the terms of the Artistic License,
  900. X#  as specified in the README file that comes with the distribution.
  901. X#  You may reuse parts of this distribution only within the terms of
  902. X#  that same Artistic License; a copy of which may be found at the root
  903. X#  of the source tree for mailagent 3.0.
  904. X#
  905. X# $Log: resync.t,v $
  906. X# Revision 3.0  1993/11/29  13:49:46  ram
  907. X# Baseline for mailagent 3.0 netwide release.
  908. X#
  909. X
  910. Xdo '../pl/cmd.pl';
  911. Xunlink 'output', "$user.1";
  912. X
  913. X&add_header('X-Tag: resync');
  914. X`$cmd`;
  915. X$? == 0 || print "1\n";
  916. X-f 'output' || print "2\n";        # Where mail is saved
  917. X-f "$user.1" && print "3\n";    # Cannot be there if RESYNC worked
  918. X-f "$user" && print "4\n";        # That would mean first match failed
  919. X
  920. Xunlink 'output', 'mail', "$user", "$user.1";
  921. Xprint "0\n";
  922. END_OF_FILE
  923.   if test 913 -ne `wc -c <'agent/test/cmd/resync.t'`; then
  924.     echo shar: \"'agent/test/cmd/resync.t'\" unpacked with wrong size!
  925.   fi
  926.   # end of 'agent/test/cmd/resync.t'
  927. fi
  928. if test -f 'agent/test/cmd/run.t' -a "${1}" != "-c" ; then 
  929.   echo shar: Will not clobber existing file \"'agent/test/cmd/run.t'\"
  930. else
  931.   echo shar: Extracting \"'agent/test/cmd/run.t'\" \(831 characters\)
  932.   sed "s/^X//" >'agent/test/cmd/run.t' <<'END_OF_FILE'
  933. X# The RUN command
  934. X
  935. X# $Id: run.t,v 3.0 1993/11/29 13:49:47 ram Exp ram $
  936. X#
  937. X#  Copyright (c) 1990-1993, Raphael Manfredi
  938. X#  
  939. X#  You may redistribute only under the terms of the Artistic License,
  940. X#  as specified in the README file that comes with the distribution.
  941. X#  You may reuse parts of this distribution only within the terms of
  942. X#  that same Artistic License; a copy of which may be found at the root
  943. X#  of the source tree for mailagent 3.0.
  944. X#
  945. X# $Log: run.t,v $
  946. X# Revision 3.0  1993/11/29  13:49:47  ram
  947. X# Baseline for mailagent 3.0 netwide release.
  948. X#
  949. X
  950. Xdo '../pl/cmd.pl';
  951. Xunlink 'ok';
  952. X
  953. X&add_header('X-Tag: run');
  954. X`$cmd`;
  955. X$? == 0 || print "1\n";
  956. X-f "$user" && print "2\n";        # Mail not saved
  957. X-f 'ok' || print "3\n";            # Output of /bin/echo
  958. X&get_log(4, 'ok');
  959. X&check_log('Works.', 5);        # It works
  960. X
  961. Xunlink 'ok', 'mail';
  962. Xprint "0\n";
  963. END_OF_FILE
  964.   if test 831 -ne `wc -c <'agent/test/cmd/run.t'`; then
  965.     echo shar: \"'agent/test/cmd/run.t'\" unpacked with wrong size!
  966.   fi
  967.   # end of 'agent/test/cmd/run.t'
  968. fi
  969. if test -f 'agent/test/cmd/server.t' -a "${1}" != "-c" ; then 
  970.   echo shar: Will not clobber existing file \"'agent/test/cmd/server.t'\"
  971. else
  972.   echo shar: Extracting \"'agent/test/cmd/server.t'\" \(608 characters\)
  973.   sed "s/^X//" >'agent/test/cmd/server.t' <<'END_OF_FILE'
  974. X# The SERVER command
  975. X
  976. X# $Id: server.t,v 3.0 1993/11/29 13:49:49 ram Exp ram $
  977. X#
  978. X#  Copyright (c) 1990-1993, Raphael Manfredi
  979. X#  
  980. X#  You may redistribute only under the terms of the Artistic License,
  981. X#  as specified in the README file that comes with the distribution.
  982. X#  You may reuse parts of this distribution only within the terms of
  983. X#  that same Artistic License; a copy of which may be found at the root
  984. X#  of the source tree for mailagent 3.0.
  985. X#
  986. X# $Log: server.t,v $
  987. X# Revision 3.0  1993/11/29  13:49:49  ram
  988. X# Baseline for mailagent 3.0 netwide release.
  989. X#
  990. X
  991. Xprint "-1\n";    # Automatic testing difficult
  992. END_OF_FILE
  993.   if test 608 -ne `wc -c <'agent/test/cmd/server.t'`; then
  994.     echo shar: \"'agent/test/cmd/server.t'\" unpacked with wrong size!
  995.   fi
  996.   # end of 'agent/test/cmd/server.t'
  997. fi
  998. if test -f 'agent/test/cmd/subst.t' -a "${1}" != "-c" ; then 
  999.   echo shar: Will not clobber existing file \"'agent/test/cmd/subst.t'\"
  1000. else
  1001.   echo shar: Extracting \"'agent/test/cmd/subst.t'\" \(889 characters\)
  1002.   sed "s/^X//" >'agent/test/cmd/subst.t' <<'END_OF_FILE'
  1003. X# The SUBST command
  1004. X
  1005. X# $Id: subst.t,v 3.0 1993/11/29 13:49:52 ram Exp ram $
  1006. X#
  1007. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1008. X#  
  1009. X#  You may redistribute only under the terms of the Artistic License,
  1010. X#  as specified in the README file that comes with the distribution.
  1011. X#  You may reuse parts of this distribution only within the terms of
  1012. X#  that same Artistic License; a copy of which may be found at the root
  1013. X#  of the source tree for mailagent 3.0.
  1014. X#
  1015. X# $Log: subst.t,v $
  1016. X# Revision 3.0  1993/11/29  13:49:52  ram
  1017. X# Baseline for mailagent 3.0 netwide release.
  1018. X#
  1019. X
  1020. Xdo '../pl/cmd.pl';
  1021. Xunlink 'output';
  1022. X
  1023. X&add_header('X-Tag: subst');
  1024. X`$cmd`;
  1025. X$? == 0 || print "1\n";
  1026. X-f "$user" && print "2\n";
  1027. X-f 'output' || print "3\n";
  1028. Xchop ($output = `cat output 2>/dev/null`);
  1029. X$output eq 'ram@eiffel.fr,melting ice technology?,melting ice technology?'
  1030. X    || print "4\n";
  1031. X
  1032. Xunlink 'mail', 'output';
  1033. Xprint "0\n";
  1034. X
  1035. END_OF_FILE
  1036.   if test 889 -ne `wc -c <'agent/test/cmd/subst.t'`; then
  1037.     echo shar: \"'agent/test/cmd/subst.t'\" unpacked with wrong size!
  1038.   fi
  1039.   # end of 'agent/test/cmd/subst.t'
  1040. fi
  1041. if test -f 'agent/test/cmd/tr.t' -a "${1}" != "-c" ; then 
  1042.   echo shar: Will not clobber existing file \"'agent/test/cmd/tr.t'\"
  1043. else
  1044.   echo shar: Extracting \"'agent/test/cmd/tr.t'\" \(896 characters\)
  1045.   sed "s/^X//" >'agent/test/cmd/tr.t' <<'END_OF_FILE'
  1046. X# The TR command
  1047. X
  1048. X# $Id: tr.t,v 3.0 1993/11/29 13:49:53 ram Exp ram $
  1049. X#
  1050. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1051. X#  
  1052. X#  You may redistribute only under the terms of the Artistic License,
  1053. X#  as specified in the README file that comes with the distribution.
  1054. X#  You may reuse parts of this distribution only within the terms of
  1055. X#  that same Artistic License; a copy of which may be found at the root
  1056. X#  of the source tree for mailagent 3.0.
  1057. X#
  1058. X# $Log: tr.t,v $
  1059. X# Revision 3.0  1993/11/29  13:49:53  ram
  1060. X# Baseline for mailagent 3.0 netwide release.
  1061. X#
  1062. X
  1063. Xdo '../pl/cmd.pl';
  1064. Xunlink 'output';
  1065. X
  1066. X&add_header('X-Tag: tr');
  1067. X`$cmd`;
  1068. X$? == 0 || print "1\n";
  1069. X-f "$user" && print "2\n";
  1070. X-f 'output' || print "3\n";
  1071. Xchop ($output = `cat output 2>/dev/null`);
  1072. X$output eq 'RAM@EIFFEL.COM,' .
  1073. X    'RE: mEltIng ICE tEChnology?,'.
  1074. X    'RE: mEltIng ICE tEChnology?' || print "4\n";
  1075. X
  1076. Xunlink 'mail', 'output';
  1077. Xprint "0\n";
  1078. X
  1079. END_OF_FILE
  1080.   if test 896 -ne `wc -c <'agent/test/cmd/tr.t'`; then
  1081.     echo shar: \"'agent/test/cmd/tr.t'\" unpacked with wrong size!
  1082.   fi
  1083.   # end of 'agent/test/cmd/tr.t'
  1084. fi
  1085. if test -f 'agent/test/filter/escape.t' -a "${1}" != "-c" ; then 
  1086.   echo shar: Will not clobber existing file \"'agent/test/filter/escape.t'\"
  1087. else
  1088.   echo shar: Extracting \"'agent/test/filter/escape.t'\" \(896 characters\)
  1089.   sed "s/^X//" >'agent/test/filter/escape.t' <<'END_OF_FILE'
  1090. X# Test escape sequences within rules
  1091. X
  1092. X# $Id: escape.t,v 3.0 1993/11/29 13:49:58 ram Exp ram $
  1093. X#
  1094. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1095. X#  
  1096. X#  You may redistribute only under the terms of the Artistic License,
  1097. X#  as specified in the README file that comes with the distribution.
  1098. X#  You may reuse parts of this distribution only within the terms of
  1099. X#  that same Artistic License; a copy of which may be found at the root
  1100. X#  of the source tree for mailagent 3.0.
  1101. X#
  1102. X# $Log: escape.t,v $
  1103. X# Revision 3.0  1993/11/29  13:49:58  ram
  1104. X# Baseline for mailagent 3.0 netwide release.
  1105. X#
  1106. X
  1107. Xdo '../pl/filter.pl';
  1108. Xunlink 'output';
  1109. X
  1110. X&add_header('X-Tag: escape');
  1111. X`$cmd`;
  1112. X$? == 0 || print "1\n";
  1113. X-f "$user" && print "2\n";        # Must have been deleted
  1114. X-f 'output' || print "3\n";        # Created by RUN
  1115. Xchop($output = `cat output 2>/dev/null`);
  1116. X$output eq ';,\\;,\\,\\w' || print "4\n";
  1117. X
  1118. Xunlink 'output';
  1119. Xprint "0\n";
  1120. END_OF_FILE
  1121.   if test 896 -ne `wc -c <'agent/test/filter/escape.t'`; then
  1122.     echo shar: \"'agent/test/filter/escape.t'\" unpacked with wrong size!
  1123.   fi
  1124.   # end of 'agent/test/filter/escape.t'
  1125. fi
  1126. if test -f 'agent/test/option/L.t' -a "${1}" != "-c" ; then 
  1127.   echo shar: Will not clobber existing file \"'agent/test/option/L.t'\"
  1128. else
  1129.   echo shar: Extracting \"'agent/test/option/L.t'\" \(715 characters\)
  1130.   sed "s/^X//" >'agent/test/option/L.t' <<'END_OF_FILE'
  1131. X# -L: force logging level
  1132. X
  1133. X# $Id: L.t,v 3.0 1993/11/29 13:50:12 ram Exp ram $
  1134. X#
  1135. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1136. X#  
  1137. X#  You may redistribute only under the terms of the Artistic License,
  1138. X#  as specified in the README file that comes with the distribution.
  1139. X#  You may reuse parts of this distribution only within the terms of
  1140. X#  that same Artistic License; a copy of which may be found at the root
  1141. X#  of the source tree for mailagent 3.0.
  1142. X#
  1143. X# $Log: L.t,v $
  1144. X# Revision 3.0  1993/11/29  13:50:12  ram
  1145. X# Baseline for mailagent 3.0 netwide release.
  1146. X#
  1147. X
  1148. Xdo '../pl/init.pl';
  1149. Xchdir '../out';
  1150. Xunlink 'agentlog';
  1151. X`$mailagent -L 0 -d 2>/dev/null`;
  1152. X$? == 0 || print "1\n";
  1153. X-f 'agentlog' && print "2\n";
  1154. Xprint "0\n";
  1155. END_OF_FILE
  1156.   if test 715 -ne `wc -c <'agent/test/option/L.t'`; then
  1157.     echo shar: \"'agent/test/option/L.t'\" unpacked with wrong size!
  1158.   fi
  1159.   # end of 'agent/test/option/L.t'
  1160. fi
  1161. if test -f 'agent/test/option/V.t' -a "${1}" != "-c" ; then 
  1162.   echo shar: Will not clobber existing file \"'agent/test/option/V.t'\"
  1163. else
  1164.   echo shar: Extracting \"'agent/test/option/V.t'\" \(693 characters\)
  1165.   sed "s/^X//" >'agent/test/option/V.t' <<'END_OF_FILE'
  1166. X# -V: print version number and exits
  1167. X
  1168. X# $Id: V.t,v 3.0 1993/11/29 13:50:12 ram Exp ram $
  1169. X#
  1170. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1171. X#  
  1172. X#  You may redistribute only under the terms of the Artistic License,
  1173. X#  as specified in the README file that comes with the distribution.
  1174. X#  You may reuse parts of this distribution only within the terms of
  1175. X#  that same Artistic License; a copy of which may be found at the root
  1176. X#  of the source tree for mailagent 3.0.
  1177. X#
  1178. X# $Log: V.t,v $
  1179. X# Revision 3.0  1993/11/29  13:50:12  ram
  1180. X# Baseline for mailagent 3.0 netwide release.
  1181. X#
  1182. X
  1183. Xdo '../pl/init.pl';
  1184. X$version = `$mailagent -V 2>&1`;
  1185. X$? == 0 || print "1\n";
  1186. X$version =~ /PL/ || print "2\n";
  1187. Xprint "0\n";
  1188. END_OF_FILE
  1189.   if test 693 -ne `wc -c <'agent/test/option/V.t'`; then
  1190.     echo shar: \"'agent/test/option/V.t'\" unpacked with wrong size!
  1191.   fi
  1192.   # end of 'agent/test/option/V.t'
  1193. fi
  1194. if test -f 'agent/test/option/h.t' -a "${1}" != "-c" ; then 
  1195.   echo shar: Will not clobber existing file \"'agent/test/option/h.t'\"
  1196. else
  1197.   echo shar: Extracting \"'agent/test/option/h.t'\" \(733 characters\)
  1198.   sed "s/^X//" >'agent/test/option/h.t' <<'END_OF_FILE'
  1199. X# -h: print this help message and exits
  1200. X
  1201. X# $Id: h.t,v 3.0 1993/11/29 13:50:17 ram Exp ram $
  1202. X#
  1203. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1204. X#  
  1205. X#  You may redistribute only under the terms of the Artistic License,
  1206. X#  as specified in the README file that comes with the distribution.
  1207. X#  You may reuse parts of this distribution only within the terms of
  1208. X#  that same Artistic License; a copy of which may be found at the root
  1209. X#  of the source tree for mailagent 3.0.
  1210. X#
  1211. X# $Log: h.t,v $
  1212. X# Revision 3.0  1993/11/29  13:50:17  ram
  1213. X# Baseline for mailagent 3.0 netwide release.
  1214. X#
  1215. X
  1216. Xdo '../pl/init.pl';
  1217. X$output = `$mailagent -h 2>&1`;
  1218. X$? != 0 || print "1\n";        # -h -> exit status 1
  1219. X$* = 1;
  1220. X$output =~ /-h : print/ || print "2\n";
  1221. Xprint "0\n";
  1222. END_OF_FILE
  1223.   if test 733 -ne `wc -c <'agent/test/option/h.t'`; then
  1224.     echo shar: \"'agent/test/option/h.t'\" unpacked with wrong size!
  1225.   fi
  1226.   # end of 'agent/test/option/h.t'
  1227. fi
  1228. if test -f 'agent/test/option/o.t' -a "${1}" != "-c" ; then 
  1229.   echo shar: Will not clobber existing file \"'agent/test/option/o.t'\"
  1230. else
  1231.   echo shar: Extracting \"'agent/test/option/o.t'\" \(763 characters\)
  1232.   sed "s/^X//" >'agent/test/option/o.t' <<'END_OF_FILE'
  1233. X# -o: overwrite config file with supplied definition
  1234. X
  1235. X# $Id: o.t,v 3.0 1993/11/29 13:50:18 ram Exp ram $
  1236. X#
  1237. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1238. X#  
  1239. X#  You may redistribute only under the terms of the Artistic License,
  1240. X#  as specified in the README file that comes with the distribution.
  1241. X#  You may reuse parts of this distribution only within the terms of
  1242. X#  that same Artistic License; a copy of which may be found at the root
  1243. X#  of the source tree for mailagent 3.0.
  1244. X#
  1245. X# $Log: o.t,v $
  1246. X# Revision 3.0  1993/11/29  13:50:18  ram
  1247. X# Baseline for mailagent 3.0 netwide release.
  1248. X#
  1249. X
  1250. Xdo '../pl/init.pl';
  1251. Xchdir '../out';
  1252. Xunlink 'mylog';
  1253. X`$mailagent -d -o 'log: mylog' 2>/dev/null`;
  1254. X$? == 0 || print "1\n";
  1255. X-s 'mylog' || print "2\n";
  1256. Xunlink 'mylog';
  1257. Xprint "0\n";
  1258. END_OF_FILE
  1259.   if test 763 -ne `wc -c <'agent/test/option/o.t'`; then
  1260.     echo shar: \"'agent/test/option/o.t'\" unpacked with wrong size!
  1261.   fi
  1262.   # end of 'agent/test/option/o.t'
  1263. fi
  1264. if test -f 'agent/test/option/r.t' -a "${1}" != "-c" ; then 
  1265.   echo shar: Will not clobber existing file \"'agent/test/option/r.t'\"
  1266. else
  1267.   echo shar: Extracting \"'agent/test/option/r.t'\" \(857 characters\)
  1268.   sed "s/^X//" >'agent/test/option/r.t' <<'END_OF_FILE'
  1269. X# -r: sepcify alternate rule file
  1270. X
  1271. X# $Id: r.t,v 3.0 1993/11/29 13:50:20 ram Exp ram $
  1272. X#
  1273. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1274. X#  
  1275. X#  You may redistribute only under the terms of the Artistic License,
  1276. X#  as specified in the README file that comes with the distribution.
  1277. X#  You may reuse parts of this distribution only within the terms of
  1278. X#  that same Artistic License; a copy of which may be found at the root
  1279. X#  of the source tree for mailagent 3.0.
  1280. X#
  1281. X# $Log: r.t,v $
  1282. X# Revision 3.0  1993/11/29  13:50:20  ram
  1283. X# Baseline for mailagent 3.0 netwide release.
  1284. X#
  1285. X
  1286. Xdo '../pl/init.pl';
  1287. Xchdir '../out';
  1288. X`cp ../rules .rules`;
  1289. X$output = `$mailagent -d 2>/dev/null`;
  1290. X$? == 0 || print "1\n";
  1291. X`cp .rules myrules`;
  1292. X$output_bis = `$mailagent -r myrules -d 2>/dev/null`;
  1293. X$? == 0 || print "2\n";
  1294. X$output eq $output_bis || print "3\n";
  1295. Xunlink 'myrules';
  1296. Xprint "0\n";
  1297. END_OF_FILE
  1298.   if test 857 -ne `wc -c <'agent/test/option/r.t'`; then
  1299.     echo shar: \"'agent/test/option/r.t'\" unpacked with wrong size!
  1300.   fi
  1301.   # end of 'agent/test/option/r.t'
  1302. fi
  1303. if test -f 'agent/test/option/what.t' -a "${1}" != "-c" ; then 
  1304.   echo shar: Will not clobber existing file \"'agent/test/option/what.t'\"
  1305. else
  1306.   echo shar: Extracting \"'agent/test/option/what.t'\" \(686 characters\)
  1307.   sed "s/^X//" >'agent/test/option/what.t' <<'END_OF_FILE'
  1308. X# Make sure invalid option leads to a meaningful exit status
  1309. X
  1310. X# $Id: what.t,v 3.0 1993/11/29 13:50:22 ram Exp ram $
  1311. X#
  1312. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1313. X#  
  1314. X#  You may redistribute only under the terms of the Artistic License,
  1315. X#  as specified in the README file that comes with the distribution.
  1316. X#  You may reuse parts of this distribution only within the terms of
  1317. X#  that same Artistic License; a copy of which may be found at the root
  1318. X#  of the source tree for mailagent 3.0.
  1319. X#
  1320. X# $Log: what.t,v $
  1321. X# Revision 3.0  1993/11/29  13:50:22  ram
  1322. X# Baseline for mailagent 3.0 netwide release.
  1323. X#
  1324. X
  1325. Xdo '../pl/init.pl';
  1326. X`$mailagent -foo -bar 2>&1`;
  1327. X$? != 0 || print "1\n";
  1328. Xprint "0\n";
  1329. END_OF_FILE
  1330.   if test 686 -ne `wc -c <'agent/test/option/what.t'`; then
  1331.     echo shar: \"'agent/test/option/what.t'\" unpacked with wrong size!
  1332.   fi
  1333.   # end of 'agent/test/option/what.t'
  1334. fi
  1335. if test -f 'agent/test/pl/init.pl' -a "${1}" != "-c" ; then 
  1336.   echo shar: Will not clobber existing file \"'agent/test/pl/init.pl'\"
  1337. else
  1338.   echo shar: Extracting \"'agent/test/pl/init.pl'\" \(911 characters\)
  1339.   sed "s/^X//" >'agent/test/pl/init.pl' <<'END_OF_FILE'
  1340. X# Set up mailagent and filter paths
  1341. X
  1342. X# $Id: init.pl,v 3.0 1993/11/29 13:50:24 ram Exp ram $
  1343. X#
  1344. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1345. X#  
  1346. X#  You may redistribute only under the terms of the Artistic License,
  1347. X#  as specified in the README file that comes with the distribution.
  1348. X#  You may reuse parts of this distribution only within the terms of
  1349. X#  that same Artistic License; a copy of which may be found at the root
  1350. X#  of the source tree for mailagent 3.0.
  1351. X#
  1352. X# $Log: init.pl,v $
  1353. X;# Revision 3.0  1993/11/29  13:50:24  ram
  1354. X;# Baseline for mailagent 3.0 netwide release.
  1355. X;#
  1356. X
  1357. X$pwd = $ENV{'PWD'};                    # Where TEST was invoked from
  1358. X($up) = $pwd =~ m|^(.*)/.*|;
  1359. X$mailagent_prog = $ENV{'MAILAGENT'};
  1360. X$mailagent_path = "$up/$mailagent_prog";
  1361. X$mailagent = "$mailagent_path -TEST";
  1362. X$filter = "$up/filter/filter";
  1363. X
  1364. X# Make sure no lock were left by previous test
  1365. Xunlink "$pwd/out/filter.lock", "$pwd/out/perl.lock";
  1366. END_OF_FILE
  1367.   if test 911 -ne `wc -c <'agent/test/pl/init.pl'`; then
  1368.     echo shar: \"'agent/test/pl/init.pl'\" unpacked with wrong size!
  1369.   fi
  1370.   # end of 'agent/test/pl/init.pl'
  1371. fi
  1372. if test -f 'agent/test/pl/misc.pl' -a "${1}" != "-c" ; then 
  1373.   echo shar: Will not clobber existing file \"'agent/test/pl/misc.pl'\"
  1374. else
  1375.   echo shar: Extracting \"'agent/test/pl/misc.pl'\" \(776 characters\)
  1376.   sed "s/^X//" >'agent/test/pl/misc.pl' <<'END_OF_FILE'
  1377. X# Common actions at the top of each misc test
  1378. X
  1379. X# $Id: misc.pl,v 3.0 1993/11/29 13:50:26 ram Exp ram $
  1380. X#
  1381. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1382. X#  
  1383. X#  You may redistribute only under the terms of the Artistic License,
  1384. X#  as specified in the README file that comes with the distribution.
  1385. X#  You may reuse parts of this distribution only within the terms of
  1386. X#  that same Artistic License; a copy of which may be found at the root
  1387. X#  of the source tree for mailagent 3.0.
  1388. X#
  1389. X# $Log: misc.pl,v $
  1390. X;# Revision 3.0  1993/11/29  13:50:26  ram
  1391. X;# Baseline for mailagent 3.0 netwide release.
  1392. X;#
  1393. X
  1394. Xdo '../pl/cmd.pl';
  1395. X
  1396. X# Add option to command string held in $cmd
  1397. Xsub add_option {
  1398. X    local($opt) = @_;
  1399. X    local(@cmd) = split(' ', $cmd);
  1400. X    $cmd = join(' ', $cmd[0], $opt, @cmd[1..$#cmd]);
  1401. X}
  1402. X
  1403. END_OF_FILE
  1404.   if test 776 -ne `wc -c <'agent/test/pl/misc.pl'`; then
  1405.     echo shar: \"'agent/test/pl/misc.pl'\" unpacked with wrong size!
  1406.   fi
  1407.   # end of 'agent/test/pl/misc.pl'
  1408. fi
  1409. if test -f 'agent/test/pl/mta.pl' -a "${1}" != "-c" ; then 
  1410.   echo shar: Will not clobber existing file \"'agent/test/pl/mta.pl'\"
  1411. else
  1412.   echo shar: Extracting \"'agent/test/pl/mta.pl'\" \(954 characters\)
  1413.   sed "s/^X//" >'agent/test/pl/mta.pl' <<'END_OF_FILE'
  1414. X# Basic MTA/NTA for tests
  1415. X
  1416. X# $Id: mta.pl,v 3.0 1993/11/29 13:50:26 ram Exp ram $
  1417. X#
  1418. X#  Copyright (c) 1990-1993, Raphael Manfredi
  1419. X#  
  1420. X#  You may redistribute only under the terms of the Artistic License,
  1421. X#  as specified in the README file that comes with the distribution.
  1422. X#  You may reuse parts of this distribution only within the terms of
  1423. X#  that same Artistic License; a copy of which may be found at the root
  1424. X#  of the source tree for mailagent 3.0.
  1425. X#
  1426. X# $Log: mta.pl,v $
  1427. X# Revision 3.0  1993/11/29  13:50:26  ram
  1428. X# Baseline for mailagent 3.0 netwide release.
  1429. X#
  1430. X
  1431. Xunlink 'send.mail', 'send.news';    # Output from our MTA and NTA
  1432. X
  1433. Xopen(MSEND, '>msend');
  1434. Xprint MSEND <<'EOM';
  1435. X#!/bin/sh
  1436. Xecho "Recipients: $@" >> send.mail
  1437. Xexec cat >> send.mail
  1438. XEOM
  1439. Xclose MSEND;
  1440. X
  1441. Xopen(NSEND, '>nsend');
  1442. Xprint NSEND <<'EOM';
  1443. X#!/bin/sh
  1444. Xexec cat >> send.news
  1445. XEOM
  1446. Xclose NSEND;
  1447. X
  1448. Xchmod 0755, 'msend', 'nsend';
  1449. X
  1450. Xsub clear_mta {
  1451. X    unlink 'msend', 'nsend', 'send.mail', 'send.news';
  1452. X}
  1453. X
  1454. END_OF_FILE
  1455.   if test 954 -ne `wc -c <'agent/test/pl/mta.pl'`; then
  1456.     echo shar: \"'agent/test/pl/mta.pl'\" unpacked with wrong size!
  1457.   fi
  1458.   # end of 'agent/test/pl/mta.pl'
  1459. fi
  1460. if test -f 'confmagic.h' -a "${1}" != "-c" ; then 
  1461.   echo shar: Will not clobber existing file \"'confmagic.h'\"
  1462. else
  1463.   echo shar: Extracting \"'confmagic.h'\" \(742 characters\)
  1464.   sed "s/^X//" >'confmagic.h' <<'END_OF_FILE'
  1465. X/*
  1466. X * This file was produced by running metaconfig and is intended to be included
  1467. X * after config.h and after all the other needed includes have been dealt with.
  1468. X *
  1469. X * This file may be empty, and should not be edited. Rerun metaconfig instead.
  1470. X * If you wish to get rid of this magic, remove this file and rerun metaconfig
  1471. X * without the -M option.
  1472. X *
  1473. X *  $Id: confmagic.h,v 3.0 1993/11/29 13:50:29 ram Exp ram $
  1474. X */
  1475. X
  1476. X#ifndef _confmagic_h_
  1477. X#define _confmagic_h_
  1478. X
  1479. X#ifndef HAS_BCOPY
  1480. X#ifndef bcopy
  1481. X#define bcopy(s,d,l) memcpy((d),(s),(l))
  1482. X#endif
  1483. X#endif
  1484. X
  1485. X#ifndef HAS_INDEX
  1486. X#ifndef index
  1487. X#define index strchr
  1488. X#endif
  1489. X#endif
  1490. X
  1491. X#ifndef HAS_INDEX
  1492. X#ifndef rindex
  1493. X#define rindex strrchr
  1494. X#endif
  1495. X#endif
  1496. X
  1497. X#ifndef HAS_VFORK
  1498. X#define vfork fork
  1499. X#endif
  1500. X
  1501. X#endif
  1502. END_OF_FILE
  1503.   if test 742 -ne `wc -c <'confmagic.h'`; then
  1504.     echo shar: \"'confmagic.h'\" unpacked with wrong size!
  1505.   fi
  1506.   # end of 'confmagic.h'
  1507. fi
  1508. if test -f 'misc/shell/README' -a "${1}" != "-c" ; then 
  1509.   echo shar: Will not clobber existing file \"'misc/shell/README'\"
  1510. else
  1511.   echo shar: Extracting \"'misc/shell/README'\" \(974 characters\)
  1512.   sed "s/^X//" >'misc/shell/README' <<'END_OF_FILE'
  1513. XThe following command allows the remote execution of arbitrary shell commands.
  1514. XThis may compromise the security of your account and/or system, so be very
  1515. Xcareful when setting it up. Only someone with a 'shell' power will be allowed
  1516. Xto use that command.
  1517. X
  1518. XTo install, add the server.cf lines to your 'comserver' file, as defined in
  1519. Xyour ~/.mailagent, then copy the 'shell' script to your 'servdir'.
  1520. X
  1521. XTo create the 'shell' power, become 'root' or 'system' and then do:
  1522. X
  1523. Xnewpower shell PASSWORD
  1524. X... fill in security clearance ...
  1525. X... (your e-mail address) ...
  1526. XEOF
  1527. X
  1528. XDo not forget to select a good password for this power.
  1529. X
  1530. XHere is an example:
  1531. X
  1532. Xset shell /bin/ksh
  1533. Xpower shell PASSWORD
  1534. Xshell
  1535. Xpwd
  1536. Xls -l
  1537. Xcat ~/.profile
  1538. XEOF
  1539. X
  1540. XThe transcript session will return you the output from the shell. If you
  1541. Xdo not select a shell via 'set shell', then /bin/sh will be used.
  1542. X
  1543. XAt any time, you may remove this remote shell access by commenting out or
  1544. Xremoving the shell command from 'comserver'.
  1545. END_OF_FILE
  1546.   if test 974 -ne `wc -c <'misc/shell/README'`; then
  1547.     echo shar: \"'misc/shell/README'\" unpacked with wrong size!
  1548.   fi
  1549.   # end of 'misc/shell/README'
  1550. fi
  1551. if test -f 'misc/unkit/README' -a "${1}" != "-c" ; then 
  1552.   echo shar: Will not clobber existing file \"'misc/unkit/README'\"
  1553. else
  1554.   echo shar: Extracting \"'misc/unkit/README'\" \(690 characters\)
  1555.   sed "s/^X//" >'misc/unkit/README' <<'END_OF_FILE'
  1556. XThis directory contains the implemetation for a new filtering action UNKIT,
  1557. Xalong with the necessary configuration files. The UNKIT command is used to
  1558. Xautomatically unkit messages produced by the 'kit' binary tar-mailer.
  1559. X
  1560. XMessages are left in a directory until all the kit parts have been received,
  1561. Xat which point 'unkit' is called and the session transcript is mailed back
  1562. Xto the user.
  1563. X
  1564. XThis was inspired by a shell script written by Christian Bertin
  1565. X<bertin@acri.fr> and doing roughly the same thing. This perl version was
  1566. Xmerely written as an exercise to see how easy/uneasy the command extension
  1567. Xprocess was.
  1568. X
  1569. X    Raphael Manfredi <ram@eiffel.com>
  1570. X    Santa Barbara, CA, USA, March 1st 1993.
  1571. END_OF_FILE
  1572.   if test 690 -ne `wc -c <'misc/unkit/README'`; then
  1573.     echo shar: \"'misc/unkit/README'\" unpacked with wrong size!
  1574.   fi
  1575.   # end of 'misc/unkit/README'
  1576. fi
  1577. if test -f 'misc/unkit/mailagent.cf' -a "${1}" != "-c" ; then 
  1578.   echo shar: Will not clobber existing file \"'misc/unkit/mailagent.cf'\"
  1579. else
  1580.   echo shar: Extracting \"'misc/unkit/mailagent.cf'\" \(796 characters\)
  1581.   sed "s/^X//" >'misc/unkit/mailagent.cf' <<'END_OF_FILE'
  1582. X#
  1583. X# Configuration for UNKIT
  1584. X#
  1585. X
  1586. Xx_unkit_dir    : ~/tmp/unkit    # Directory where UNKIT works (default ~/kit)
  1587. Xx_unkit_remove : YES            # Remove temporary files upon exctraction
  1588. Xx_unkit_pname  : .kpart            # Leading temporary file name (default .kp)
  1589. Xx_unkit_opt    : -b                # Additional unkit option
  1590. Xx_unkit_log    : kitlog            # Where UNKIT logs what it does
  1591. Xx_unkit_notify : ~/mail/kitok    # Message to be sent when kit received
  1592. Xx_unkit_info   : README            # File name for kit-embeded instructions
  1593. X
  1594. X#
  1595. X# The following are not implemented yet...
  1596. X#
  1597. X
  1598. Xx_unkit_sizemax: 1000000        # Do not automatically unkit past this size
  1599. Xx_unkit_timeout: 3d                # Timeout before discarding (3 days)
  1600. Xx_unkit_output : YES            # Do we want any output mailed back if ok?
  1601. Xx_unkit_trust  : ~/mail/trust    # Trusted people list (regexp form)
  1602. X
  1603. END_OF_FILE
  1604.   if test 796 -ne `wc -c <'misc/unkit/mailagent.cf'`; then
  1605.     echo shar: \"'misc/unkit/mailagent.cf'\" unpacked with wrong size!
  1606.   fi
  1607.   # end of 'misc/unkit/mailagent.cf'
  1608. fi
  1609. echo shar: End of archive 25 \(of 26\).
  1610. cp /dev/null ark25isdone
  1611. MISSING=""
  1612. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ; do
  1613.     if test ! -f ark${I}isdone ; then
  1614.     MISSING="${MISSING} ${I}"
  1615.     fi
  1616. done
  1617. if test "${MISSING}" = "" ; then
  1618.     echo You have unpacked all 26 archives.
  1619.     echo "Now run 'sh PACKNOTES', then read README and type Configure.'"
  1620.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1621. else
  1622.     echo You still must unpack the following archives:
  1623.     echo "        " ${MISSING}
  1624. fi
  1625. exit 0
  1626.  
  1627. exit 0 # Just in case...
  1628.