home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-03 | 53.7 KB | 1,628 lines |
- Newsgroups: comp.sources.misc
- From: Raphael Manfredi <ram@acri.fr>
- Subject: v41i025: mailagent - Flexible mail filtering and processing package, v3.0, Part25/26
- Message-ID: <1993Dec3.213703.23427@sparky.sterling.com>
- X-Md4-Signature: bbb21db19e51237a906ff53c132f32e4
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Advanced Computer Research Institute, Lyon, France.
- Date: Fri, 3 Dec 1993 21:37:03 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: Raphael Manfredi <ram@acri.fr>
- Posting-number: Volume 41, Issue 25
- Archive-name: mailagent/part25
- Environment: UNIX, Perl
- Supersedes: mailagent: Volume 33, Issue 93-109
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: agent/README agent/examples/daemon
- # agent/examples/mailfolders agent/examples/mhinc
- # agent/examples/nocmds agent/examples/vacation
- # agent/files/Jmakefile agent/files/commands agent/files/distribs
- # agent/files/help/README agent/files/passwd agent/filter/msg.h
- # agent/man/Jmakefile agent/pl/actions.pl.02 agent/pl/fatal.pl
- # agent/pl/gensym.pl agent/pl/q.pl agent/pl/tilde.pl
- # agent/test/cmd/abort.t agent/test/cmd/delete.t
- # agent/test/cmd/feed.t agent/test/cmd/macro.t agent/test/cmd/nop.t
- # agent/test/cmd/process.t agent/test/cmd/queue.t
- # agent/test/cmd/resync.t agent/test/cmd/run.t
- # agent/test/cmd/server.t agent/test/cmd/subst.t agent/test/cmd/tr.t
- # agent/test/filter/escape.t agent/test/option/L.t
- # agent/test/option/V.t agent/test/option/h.t agent/test/option/o.t
- # agent/test/option/r.t agent/test/option/what.t
- # agent/test/pl/init.pl agent/test/pl/misc.pl agent/test/pl/mta.pl
- # confmagic.h misc/shell/README misc/unkit/README
- # misc/unkit/mailagent.cf
- # Wrapped by ram@soft208 on Mon Nov 29 16:49:58 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 25 (of 26)."'
- if test -f 'agent/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/README'\"
- else
- echo shar: Extracting \"'agent/README'\" \(930 characters\)
- sed "s/^X//" >'agent/README' <<'END_OF_FILE'
- XThis is the root directory for mailagent.
- X
- XIf you choose to install the mailagent, you will enable people to
- Xask for patches and eventually distributions. You need kit 2.0
- X(at least PL 9) and cshar 3.0 for the mailagent's PROCESS command to
- Xwork properly. If you miss one of those, you can request them from my
- Xown mailagent.
- X
- XYou will also have access to filtering abilities, specified using
- Xlex-like rules. The mailagent will delete all those mails you do not
- Xwish to read, forward others (e.g. rebroadcasting a mailing list),
- Xand file mail into folders for delayed reading.
- X
- XInstructions for configuring and setting your mailagent are found
- Xin the manual page. Once all is installed, run "man mailagent".
- XYou can also go to the man/ subdirectory and run the following:
- X"nroff -man mailagent.1 | more -s".
- X
- XLook at the README file in the filter/ directory for hints on choosing
- Xbetween the C or the shell version of the filter.
- END_OF_FILE
- if test 930 -ne `wc -c <'agent/README'`; then
- echo shar: \"'agent/README'\" unpacked with wrong size!
- fi
- # end of 'agent/README'
- fi
- if test -f 'agent/examples/daemon' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/examples/daemon'\"
- else
- echo shar: Extracting \"'agent/examples/daemon'\" \(298 characters\)
- sed "s/^X//" >'agent/examples/daemon' <<'END_OF_FILE'
- X#
- X# Rule file for mailagent
- X#
- X
- Xmaildir = ~/mail;
- X
- XTo Cc: ram { BEGIN RAM; REJECT };
- X
- X<RAM> From: root, mailer-daemon, uucp { BEGIN INITIAL; REJECT };
- X<RAM> { ONCE (%r,vacation,1d) MESSAGE ~/.vacation; REJECT };
- X
- X{ LEAVE; BOUNCE ram@eiffel.fr };
- X
- X<_SEEN_> { DELETE };
- X
- X#
- X# End of mailagent rules
- X#
- END_OF_FILE
- if test 298 -ne `wc -c <'agent/examples/daemon'`; then
- echo shar: \"'agent/examples/daemon'\" unpacked with wrong size!
- fi
- # end of 'agent/examples/daemon'
- fi
- if test -f 'agent/examples/mailfolders' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/examples/mailfolders'\"
- else
- echo shar: Extracting \"'agent/examples/mailfolders'\" \(249 characters\)
- sed "s/^X//" >'agent/examples/mailfolders' <<'END_OF_FILE'
- X#
- X# Folders which should be scanned by ksh for new mail
- X#
- X~/mail/ftp.mail
- X~/mail/cmds
- X~/mbox.filter
- X~/mbox.urgent
- X~/mail/gue
- X~/mail/comp.mail.mh
- X~/mail/unix-src
- X~/mail/unix-wiz
- X~/mail/admin
- X~/mail/ise
- X~/mail/rdb
- X~/mail/dist
- X~/mail/frog
- X~/mail/magic
- END_OF_FILE
- if test 249 -ne `wc -c <'agent/examples/mailfolders'`; then
- echo shar: \"'agent/examples/mailfolders'\" unpacked with wrong size!
- fi
- # end of 'agent/examples/mailfolders'
- fi
- if test -f 'agent/examples/mhinc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/examples/mhinc'\"
- else
- echo shar: Extracting \"'agent/examples/mhinc'\" \(676 characters\)
- sed "s/^X//" >'agent/examples/mhinc' <<'END_OF_FILE'
- X#! /bin/sh
- X# @(#) incorporates mail in an mh folder from a mail/news folder
- X
- Xif test $# -eq 0; then
- X exec inc
- Xfi
- X
- Xif folder="$HOME/mail/$1" && test -s $folder; then
- X :
- Xelif folder="$HOME/news/$1" && test -s $folder; then
- X :
- Xelse
- X echo "mhinc: no mail to incorporate"
- X exit 0
- Xfi
- X
- Xif test -d $folder; then
- X echo "mhinc: $folder is a directory!"
- X exit 0
- Xfi
- X
- Xecho "mhinc: using $folder"
- Xinc +$1 -file $folder -truncate
- X
- X# Do not leave zero-length files. This may lead to some trouble when
- X# saving news articles in them (trn will not recognize the "mailbox"
- X# format, which is required by inc).
- X
- Xif test -s $folder; then
- X echo "mhinc: folder was not emptied"
- Xelse
- X rm $folder
- Xfi
- X
- END_OF_FILE
- if test 676 -ne `wc -c <'agent/examples/mhinc'`; then
- echo shar: \"'agent/examples/mhinc'\" unpacked with wrong size!
- fi
- chmod +x 'agent/examples/mhinc'
- # end of 'agent/examples/mhinc'
- fi
- if test -f 'agent/examples/nocmds' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/examples/nocmds'\"
- else
- echo shar: Extracting \"'agent/examples/nocmds'\" \(610 characters\)
- sed "s/^X//" >'agent/examples/nocmds' <<'END_OF_FILE'
- X[This is a recording -- Last revision was made on %T]
- X
- XDear %N:
- X
- XI have received your command mail dated %[Date].
- X
- XI am truly sorry, but the mailagent access has been denied to you for various
- Xreasons. Your mail however was not lost but filtered normally, which means
- XI will have a look at it. I may eventually execute the command myself, if
- Xnecessary and needed.
- X
- XThank you for your understanding.
- X--
- XRaphael Manfredi <ram@acri.fr>
- XAdvanced Computer Research Institute
- X1, boulevard Marius Vivier-Merle / Tel +33 72-35-80-55 \
- X69443 Lyon Cedex 03, FRANCE \ Fax +33 72-35-84-10 /
- END_OF_FILE
- if test 610 -ne `wc -c <'agent/examples/nocmds'`; then
- echo shar: \"'agent/examples/nocmds'\" unpacked with wrong size!
- fi
- # end of 'agent/examples/nocmds'
- fi
- if test -f 'agent/examples/vacation' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/examples/vacation'\"
- else
- echo shar: Extracting \"'agent/examples/vacation'\" \(457 characters\)
- sed "s/^X//" >'agent/examples/vacation' <<'END_OF_FILE'
- XSubject: This is a recording... [Re: %R]
- XOrganization: %o
- X
- X[This is a recording -- Last revision was made on %T (month/day)]
- X
- XHello %N:
- X
- XI have received your message of %[Date], whose subject
- Xwas "%s" and dropped it into one
- Xof %u's mailbox. I will send you such an acknowledgment only once a day.
- X(Your mail was received by a program, not by a person, in case you wonder.)
- X
- X%U told me:
- X
- XSuitable vacation message goes here...
- X
- X-- mailagent speaking for %u
- END_OF_FILE
- if test 457 -ne `wc -c <'agent/examples/vacation'`; then
- echo shar: \"'agent/examples/vacation'\" unpacked with wrong size!
- fi
- # end of 'agent/examples/vacation'
- fi
- if test -f 'agent/files/Jmakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/files/Jmakefile'\"
- else
- echo shar: Extracting \"'agent/files/Jmakefile'\" \(867 characters\)
- sed "s/^X//" >'agent/files/Jmakefile' <<'END_OF_FILE'
- X/*
- X * Jmakefile for mailagent's files
- X */
- X
- X;# $Id: Jmakefile,v 3.0 1993/11/29 13:47:46 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: Jmakefile,v $
- X;# Revision 3.0 1993/11/29 13:47:46 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X
- XFILES = agenthelp commands distribs filter.sh mailagent.cf proglist \
- X chkagent.sh
- X
- X>PRIVLIB /* Force metaconfig to ask for privlib location */
- X
- Xall::
- X
- XMakeInstallDirectories($(PRIVLIB))
- XInstallMultipleDestFlags(install,$(FILES),$(PRIVLIB),-m 444)
- X
- XSetSubdirs(help)
- END_OF_FILE
- if test 867 -ne `wc -c <'agent/files/Jmakefile'`; then
- echo shar: \"'agent/files/Jmakefile'\" unpacked with wrong size!
- fi
- # end of 'agent/files/Jmakefile'
- fi
- if test -f 'agent/files/commands' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/files/commands'\"
- else
- echo shar: Extracting \"'agent/files/commands'\" \(45 characters\)
- sed "s/^X//" >'agent/files/commands' <<'END_OF_FILE'
- Xmailpatch
- Xmailhelp
- Xmaillist
- Xmaildist
- Xpackage
- END_OF_FILE
- if test 45 -ne `wc -c <'agent/files/commands'`; then
- echo shar: \"'agent/files/commands'\" unpacked with wrong size!
- fi
- # end of 'agent/files/commands'
- fi
- if test -f 'agent/files/distribs' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/files/distribs'\"
- else
- echo shar: Extracting \"'agent/files/distribs'\" \(807 characters\)
- sed "s/^X//" >'agent/files/distribs' <<'END_OF_FILE'
- X# Distributions (under vi, use ':set ts=4')
- X
- X# prog version path archiv .Z patches
- X
- Xkit 1.0 ~/home/projects/kit n n o
- Xkit 2.0 ~/home/projects/kit n n y
- Xdist 2.0 ~/home/projects/dist n n y
- Xmatrix 1.1 ~/home/projects/matrix n n y
- Xcshar 3.0 ~/home/projects/cshar-3.0 n n y
- Xfile --- ~/arch/dist/file y y n
- Xrcs 5.5 ~/arch/dist/rcs-5.5 y y n
- Xcops --- ~/arch/dist/cops y y n
- Xflex 2.3 ~/arch/dist/flex2.3 y y n
- Xxfmt --- ~/arch/dist/xfmt y y n
- Xet --- ~/arch/dist/et y y n
- Xless 123 ~/arch/dist/less y y n
- Xundel 2.0 ~/arch/dist/undel2 y y n
- Xperl 3.0 ~/arch/dist/perl-3.0 n n n
- Xperl 4.0 ~/arch/dist/perl-4.0 n n p
- Xpatch 2.0 ~/arch/dist/patch y y n
- X
- X#rcs 4.3 ~/arch/dist/rcs.4_3 y y n
- X#undel 1.0 ~/arch/dist/UNDEL y y n
- X#dither 1.0 ~/arch/dist/DITHER y y y
- END_OF_FILE
- if test 807 -ne `wc -c <'agent/files/distribs'`; then
- echo shar: \"'agent/files/distribs'\" unpacked with wrong size!
- fi
- # end of 'agent/files/distribs'
- fi
- if test -f 'agent/files/help/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/files/help/README'\"
- else
- echo shar: Extracting \"'agent/files/help/README'\" \(67 characters\)
- sed "s/^X//" >'agent/files/help/README' <<'END_OF_FILE'
- XThis directory contains help files for mailagent's SERVER command.
- END_OF_FILE
- if test 67 -ne `wc -c <'agent/files/help/README'`; then
- echo shar: \"'agent/files/help/README'\" unpacked with wrong size!
- fi
- # end of 'agent/files/help/README'
- fi
- if test -f 'agent/files/passwd' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/files/passwd'\"
- else
- echo shar: Extracting \"'agent/files/passwd'\" \(409 characters\)
- sed "s/^X//" >'agent/files/passwd' <<'END_OF_FILE'
- Xroot:*: Super user, may do almost anything
- Xsecurity:*: Security password for critical requests
- Xsystem:<system>: May add/delete powers, edit config files
- Xmail:<mail>: To work on mail messages in folders (from maildir)
- Xlist:<list>: May perform administration on mailing lists
- Xshell:*: Shell clearance needed to execute shell commands
- Xfile:*: File clearance needed to retrieve arbitrary files
- END_OF_FILE
- if test 409 -ne `wc -c <'agent/files/passwd'`; then
- echo shar: \"'agent/files/passwd'\" unpacked with wrong size!
- fi
- # end of 'agent/files/passwd'
- fi
- if test -f 'agent/filter/msg.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/filter/msg.h'\"
- else
- echo shar: Extracting \"'agent/filter/msg.h'\" \(937 characters\)
- sed "s/^X//" >'agent/filter/msg.h' <<'END_OF_FILE'
- X/*
- X
- X # # #### #### # #
- X ## ## # # # # #
- X # ## # #### # ######
- X # # # # ### ### # #
- X # # # # # # ### # #
- X # # #### #### ### # #
- X
- X Declaration of message related functions.
- X*/
- X
- X/*
- X * $Id: msg.h,v 3.0 1993/11/29 13:48:17 ram Exp ram $
- X *
- X * Copyright (c) 1990-1993, Raphael Manfredi
- X *
- X * You may redistribute only under the terms of the Artistic License,
- X * as specified in the README file that comes with the distribution.
- X * You may reuse parts of this distribution only within the terms of
- X * that same Artistic License; a copy of which may be found at the root
- X * of the source tree for mailagent 3.0.
- X *
- X * $Log: msg.h,v $
- X * Revision 3.0 1993/11/29 13:48:17 ram
- X * Baseline for mailagent 3.0 netwide release.
- X *
- X */
- X
- X#ifndef _msg_h_
- X#define _msg_h_
- X
- Xextern void fatal(); /* For fatal errors */
- X
- X#endif
- END_OF_FILE
- if test 937 -ne `wc -c <'agent/filter/msg.h'`; then
- echo shar: \"'agent/filter/msg.h'\" unpacked with wrong size!
- fi
- # end of 'agent/filter/msg.h'
- fi
- if test -f 'agent/man/Jmakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/man/Jmakefile'\"
- else
- echo shar: Extracting \"'agent/man/Jmakefile'\" \(798 characters\)
- sed "s/^X//" >'agent/man/Jmakefile' <<'END_OF_FILE'
- X/*
- X * Jmakefile for mailagent's manual pages
- X */
- X
- X;# $Id: Jmakefile,v 3.0 1993/11/29 13:48:25 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: Jmakefile,v $
- X;# Revision 3.0 1993/11/29 13:48:25 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X
- X>L /* I expect to fix this with an |append command */
- X
- XMPAGES = mailagent.$(L) maildist.$(L) maillist.$(L) mailhelp.$(L) \
- X mailpatch.$(L) package.$(L)
- X
- XComplexShellManualTarget($(MPAGES))
- END_OF_FILE
- if test 798 -ne `wc -c <'agent/man/Jmakefile'`; then
- echo shar: \"'agent/man/Jmakefile'\" unpacked with wrong size!
- fi
- # end of 'agent/man/Jmakefile'
- fi
- if test -f 'agent/pl/actions.pl.02' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/pl/actions.pl.02'\"
- else
- echo shar: Extracting \"'agent/pl/actions.pl.02'\" \(471 characters\)
- sed "s/^X//" >'agent/pl/actions.pl.02' <<'END_OF_FILE'
- X# Check body message (typically head of digest message) and return 1 if its
- X# body is empty, 0 otherwise.
- Xsub empty_body {
- X local(*ary) = @_;
- X local(@array) = @ary; # Work on a copy
- X local($_);
- X local($is_empty) = 1;
- X do {
- X $_ = pop(@array); # Remove what belongs to next digest item
- X } while !/^---/;
- X do {
- X $_ = shift(@array); # Remove the whole header
- X } while !/^$/;
- X foreach (@array) {
- X $is_empty = 0 unless /^\s*$/;
- X last unless $is_empty;
- X }
- X $is_empty;
- X}
- X
- END_OF_FILE
- if test 471 -ne `wc -c <'agent/pl/actions.pl.02'`; then
- echo shar: \"'agent/pl/actions.pl.02'\" unpacked with wrong size!
- fi
- # end of 'agent/pl/actions.pl.02'
- fi
- if test -f 'agent/pl/fatal.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/pl/fatal.pl'\"
- else
- echo shar: Extracting \"'agent/pl/fatal.pl'\" \(928 characters\)
- sed "s/^X//" >'agent/pl/fatal.pl' <<'END_OF_FILE'
- X;# $Id: fatal.pl,v 3.0 1993/11/29 13:48:45 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: fatal.pl,v $
- X;# Revision 3.0 1993/11/29 13:48:45 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X;#
- X# In case of fatal error, the program does not simply die
- X# but also records the failure in the log.
- Xsub fatal {
- X local($reason) = @_; # Why did we get here ?
- X &add_log("FAILED ($reason)") if $loglvl > 0;
- X die "$prog_name: $reason\n";
- X}
- X
- X# Emergency signal was caught
- Xsub emergency {
- X local($sig) = @_; # First argument is signal name
- X &fatal("trapped SIG$sig");
- X}
- X
- END_OF_FILE
- if test 928 -ne `wc -c <'agent/pl/fatal.pl'`; then
- echo shar: \"'agent/pl/fatal.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/pl/fatal.pl'
- fi
- if test -f 'agent/pl/gensym.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/pl/gensym.pl'\"
- else
- echo shar: Extracting \"'agent/pl/gensym.pl'\" \(735 characters\)
- sed "s/^X//" >'agent/pl/gensym.pl' <<'END_OF_FILE'
- X;# $Id: gensym.pl,v 3.0 1993/11/29 13:48:48 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: gensym.pl,v $
- X;# Revision 3.0 1993/11/29 13:48:48 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X;#
- X# Create a new symbol name each time it is invoked. That name is suitable for
- X# usage as a perl variable name.
- Xsub gensym {
- X $Gensym = 'AAAAA' unless $Gensym;
- X $Gensym++;
- X}
- X
- END_OF_FILE
- if test 735 -ne `wc -c <'agent/pl/gensym.pl'`; then
- echo shar: \"'agent/pl/gensym.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/pl/gensym.pl'
- fi
- if test -f 'agent/pl/q.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/pl/q.pl'\"
- else
- echo shar: Extracting \"'agent/pl/q.pl'\" \(634 characters\)
- sed "s/^X//" >'agent/pl/q.pl' <<'END_OF_FILE'
- X;# $Id: q.pl,v 3.0 1993/11/29 13:49:10 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: q.pl,v $
- X;# Revision 3.0 1993/11/29 13:49:10 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X# Quotation removal routine
- Xsub q {
- X local($_) = @_;
- X local($*) = 1;
- X s/^://g;
- X $_;
- X}
- X
- END_OF_FILE
- if test 634 -ne `wc -c <'agent/pl/q.pl'`; then
- echo shar: \"'agent/pl/q.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/pl/q.pl'
- fi
- if test -f 'agent/pl/tilde.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/pl/tilde.pl'\"
- else
- echo shar: Extracting \"'agent/pl/tilde.pl'\" \(835 characters\)
- sed "s/^X//" >'agent/pl/tilde.pl' <<'END_OF_FILE'
- X;# $Id: tilde.pl,v 3.0 1993/11/29 13:49:18 ram Exp ram $
- X;#
- X;# Copyright (c) 1990-1993, Raphael Manfredi
- X;#
- X;# You may redistribute only under the terms of the Artistic License,
- X;# as specified in the README file that comes with the distribution.
- X;# You may reuse parts of this distribution only within the terms of
- X;# that same Artistic License; a copy of which may be found at the root
- X;# of the source tree for mailagent 3.0.
- X;#
- X;# $Log: tilde.pl,v $
- X;# Revision 3.0 1993/11/29 13:49:18 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X;#
- X# Perform ~name expansion ala ksh...
- X# (banish csh from your vocabulary ;-)
- Xsub tilda_expand {
- X local($path) = @_;
- X return $path unless $path =~ /^~/;
- X $path =~ s:^~([^/]+):(getpwnam($1))[$[+7]:e; # ~name
- X $path =~ s:^~:$ENV{'HOME'} || (getpwuid($<))[$[+7]:e; # ~
- X $path;
- X}
- X
- END_OF_FILE
- if test 835 -ne `wc -c <'agent/pl/tilde.pl'`; then
- echo shar: \"'agent/pl/tilde.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/pl/tilde.pl'
- fi
- if test -f 'agent/test/cmd/abort.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/abort.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/abort.t'\" \(850 characters\)
- sed "s/^X//" >'agent/test/cmd/abort.t' <<'END_OF_FILE'
- X# Test ABORT command
- X
- X# $Id: abort.t,v 3.0 1993/11/29 13:49:25 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: abort.t,v $
- X# Revision 3.0 1993/11/29 13:49:25 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink "$user.1", 'always';
- X
- X&add_header('X-Tag: abort');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user.1" && print "2\n"; # Have aborted
- X-f "$user" && print "3\n"; # match -> no leave
- X-f 'always' || print "4\n";
- X
- Xunlink "$user", "$user.1", 'always', 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 850 -ne `wc -c <'agent/test/cmd/abort.t'`; then
- echo shar: \"'agent/test/cmd/abort.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/abort.t'
- fi
- if test -f 'agent/test/cmd/delete.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/delete.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/delete.t'\" \(719 characters\)
- sed "s/^X//" >'agent/test/cmd/delete.t' <<'END_OF_FILE'
- X# Test DELETE command
- X
- X# $Id: delete.t,v 3.0 1993/11/29 13:49:30 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: delete.t,v $
- X# Revision 3.0 1993/11/29 13:49:30 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- X
- X&add_header('X-Tag: delete');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Mail deleted
- X
- Xunlink 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 719 -ne `wc -c <'agent/test/cmd/delete.t'`; then
- echo shar: \"'agent/test/cmd/delete.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/delete.t'
- fi
- if test -f 'agent/test/cmd/feed.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/feed.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/feed.t'\" \(924 characters\)
- sed "s/^X//" >'agent/test/cmd/feed.t' <<'END_OF_FILE'
- X# Test FEED command
- X
- X# $Id: feed.t,v 3.0 1993/11/29 13:49:31 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: feed.t,v $
- X# Revision 3.0 1993/11/29 13:49:31 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'ok', 'no_resync';
- X
- X&add_header('X-Tag: feed');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Mail saved...
- X-f 'ok' || print "3\n"; # ...here
- X&get_log(4, 'ok');
- X¬_log('^To:', 5); # Make sure To: disappeared
- X-f 'no_resync' || print "6\n"; # Ensure header not disturbed
- X
- Xunlink 'ok', 'no_resync', 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 924 -ne `wc -c <'agent/test/cmd/feed.t'`; then
- echo shar: \"'agent/test/cmd/feed.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/feed.t'
- fi
- if test -f 'agent/test/cmd/macro.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/macro.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/macro.t'\" \(857 characters\)
- sed "s/^X//" >'agent/test/cmd/macro.t' <<'END_OF_FILE'
- X# Test MACRO command
- X
- X# $Id: macro.t,v 3.0 1993/11/29 13:49:34 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: macro.t,v $
- X# Revision 3.0 1993/11/29 13:49:34 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'ok';
- X
- X&add_header('X-Tag: macro');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Mail not saved
- X-f 'ok' || print "3\n"; # Output of /bin/echo
- X&get_log(4, 'ok');
- X&check_log('^It seems to work fine.', 5); # It works
- X
- Xunlink 'ok', 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 857 -ne `wc -c <'agent/test/cmd/macro.t'`; then
- echo shar: \"'agent/test/cmd/macro.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/macro.t'
- fi
- if test -f 'agent/test/cmd/nop.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/nop.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/nop.t'\" \(745 characters\)
- sed "s/^X//" >'agent/test/cmd/nop.t' <<'END_OF_FILE'
- X# The NOP command
- X
- X# $Id: nop.t,v 3.0 1993/11/29 13:49:35 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: nop.t,v $
- X# Revision 3.0 1993/11/29 13:49:35 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- X
- X# Make sure NOP is recognized (not defaulted to LEAVE)
- X&add_header('X-Tag: nop');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n";
- X
- Xunlink 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 745 -ne `wc -c <'agent/test/cmd/nop.t'`; then
- echo shar: \"'agent/test/cmd/nop.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/nop.t'
- fi
- if test -f 'agent/test/cmd/process.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/process.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/process.t'\" \(611 characters\)
- sed "s/^X//" >'agent/test/cmd/process.t' <<'END_OF_FILE'
- X# The PROCESS command
- X
- X# $Id: process.t,v 3.0 1993/11/29 13:49:40 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: process.t,v $
- X# Revision 3.0 1993/11/29 13:49:40 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xprint "-1\n"; # Automatic testing difficult
- END_OF_FILE
- if test 611 -ne `wc -c <'agent/test/cmd/process.t'`; then
- echo shar: \"'agent/test/cmd/process.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/process.t'
- fi
- if test -f 'agent/test/cmd/queue.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/queue.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/queue.t'\" \(909 characters\)
- sed "s/^X//" >'agent/test/cmd/queue.t' <<'END_OF_FILE'
- X# Test QUEUE command
- X
- X# $Id: queue.t,v 3.0 1993/11/29 13:49:41 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: queue.t,v $
- X# Revision 3.0 1993/11/29 13:49:41 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- X
- Xunlink <queue/*>;
- X
- X&add_header('X-Tag: queue');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Mail queued -> saved
- X
- X@queue = <queue/qm*>;
- X@queue == 4 || print "3\n";
- X$size = -s 'mail';
- X$ok = 1;
- Xforeach (@queue) {
- X $ok == 0 if $size != -s $_;
- X}
- X$ok || print "4\n";
- X
- Xunlink <queue/*>;
- Xunlink 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 909 -ne `wc -c <'agent/test/cmd/queue.t'`; then
- echo shar: \"'agent/test/cmd/queue.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/queue.t'
- fi
- if test -f 'agent/test/cmd/resync.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/resync.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/resync.t'\" \(913 characters\)
- sed "s/^X//" >'agent/test/cmd/resync.t' <<'END_OF_FILE'
- X# The RESYNC command
- X
- X# $Id: resync.t,v 3.0 1993/11/29 13:49:46 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: resync.t,v $
- X# Revision 3.0 1993/11/29 13:49:46 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'output', "$user.1";
- X
- X&add_header('X-Tag: resync');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f 'output' || print "2\n"; # Where mail is saved
- X-f "$user.1" && print "3\n"; # Cannot be there if RESYNC worked
- X-f "$user" && print "4\n"; # That would mean first match failed
- X
- Xunlink 'output', 'mail', "$user", "$user.1";
- Xprint "0\n";
- END_OF_FILE
- if test 913 -ne `wc -c <'agent/test/cmd/resync.t'`; then
- echo shar: \"'agent/test/cmd/resync.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/resync.t'
- fi
- if test -f 'agent/test/cmd/run.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/run.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/run.t'\" \(831 characters\)
- sed "s/^X//" >'agent/test/cmd/run.t' <<'END_OF_FILE'
- X# The RUN command
- X
- X# $Id: run.t,v 3.0 1993/11/29 13:49:47 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: run.t,v $
- X# Revision 3.0 1993/11/29 13:49:47 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'ok';
- X
- X&add_header('X-Tag: run');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Mail not saved
- X-f 'ok' || print "3\n"; # Output of /bin/echo
- X&get_log(4, 'ok');
- X&check_log('Works.', 5); # It works
- X
- Xunlink 'ok', 'mail';
- Xprint "0\n";
- END_OF_FILE
- if test 831 -ne `wc -c <'agent/test/cmd/run.t'`; then
- echo shar: \"'agent/test/cmd/run.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/run.t'
- fi
- if test -f 'agent/test/cmd/server.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/server.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/server.t'\" \(608 characters\)
- sed "s/^X//" >'agent/test/cmd/server.t' <<'END_OF_FILE'
- X# The SERVER command
- X
- X# $Id: server.t,v 3.0 1993/11/29 13:49:49 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: server.t,v $
- X# Revision 3.0 1993/11/29 13:49:49 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xprint "-1\n"; # Automatic testing difficult
- END_OF_FILE
- if test 608 -ne `wc -c <'agent/test/cmd/server.t'`; then
- echo shar: \"'agent/test/cmd/server.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/server.t'
- fi
- if test -f 'agent/test/cmd/subst.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/subst.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/subst.t'\" \(889 characters\)
- sed "s/^X//" >'agent/test/cmd/subst.t' <<'END_OF_FILE'
- X# The SUBST command
- X
- X# $Id: subst.t,v 3.0 1993/11/29 13:49:52 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: subst.t,v $
- X# Revision 3.0 1993/11/29 13:49:52 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'output';
- X
- X&add_header('X-Tag: subst');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n";
- X-f 'output' || print "3\n";
- Xchop ($output = `cat output 2>/dev/null`);
- X$output eq 'ram@eiffel.fr,melting ice technology?,melting ice technology?'
- X || print "4\n";
- X
- Xunlink 'mail', 'output';
- Xprint "0\n";
- X
- END_OF_FILE
- if test 889 -ne `wc -c <'agent/test/cmd/subst.t'`; then
- echo shar: \"'agent/test/cmd/subst.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/subst.t'
- fi
- if test -f 'agent/test/cmd/tr.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/cmd/tr.t'\"
- else
- echo shar: Extracting \"'agent/test/cmd/tr.t'\" \(896 characters\)
- sed "s/^X//" >'agent/test/cmd/tr.t' <<'END_OF_FILE'
- X# The TR command
- X
- X# $Id: tr.t,v 3.0 1993/11/29 13:49:53 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: tr.t,v $
- X# Revision 3.0 1993/11/29 13:49:53 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/cmd.pl';
- Xunlink 'output';
- X
- X&add_header('X-Tag: tr');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n";
- X-f 'output' || print "3\n";
- Xchop ($output = `cat output 2>/dev/null`);
- X$output eq 'RAM@EIFFEL.COM,' .
- X 'RE: mEltIng ICE tEChnology?,'.
- X 'RE: mEltIng ICE tEChnology?' || print "4\n";
- X
- Xunlink 'mail', 'output';
- Xprint "0\n";
- X
- END_OF_FILE
- if test 896 -ne `wc -c <'agent/test/cmd/tr.t'`; then
- echo shar: \"'agent/test/cmd/tr.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/cmd/tr.t'
- fi
- if test -f 'agent/test/filter/escape.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/filter/escape.t'\"
- else
- echo shar: Extracting \"'agent/test/filter/escape.t'\" \(896 characters\)
- sed "s/^X//" >'agent/test/filter/escape.t' <<'END_OF_FILE'
- X# Test escape sequences within rules
- X
- X# $Id: escape.t,v 3.0 1993/11/29 13:49:58 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: escape.t,v $
- X# Revision 3.0 1993/11/29 13:49:58 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/filter.pl';
- Xunlink 'output';
- X
- X&add_header('X-Tag: escape');
- X`$cmd`;
- X$? == 0 || print "1\n";
- X-f "$user" && print "2\n"; # Must have been deleted
- X-f 'output' || print "3\n"; # Created by RUN
- Xchop($output = `cat output 2>/dev/null`);
- X$output eq ';,\\;,\\,\\w' || print "4\n";
- X
- Xunlink 'output';
- Xprint "0\n";
- END_OF_FILE
- if test 896 -ne `wc -c <'agent/test/filter/escape.t'`; then
- echo shar: \"'agent/test/filter/escape.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/filter/escape.t'
- fi
- if test -f 'agent/test/option/L.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/L.t'\"
- else
- echo shar: Extracting \"'agent/test/option/L.t'\" \(715 characters\)
- sed "s/^X//" >'agent/test/option/L.t' <<'END_OF_FILE'
- X# -L: force logging level
- X
- X# $Id: L.t,v 3.0 1993/11/29 13:50:12 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: L.t,v $
- X# Revision 3.0 1993/11/29 13:50:12 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- Xchdir '../out';
- Xunlink 'agentlog';
- X`$mailagent -L 0 -d 2>/dev/null`;
- X$? == 0 || print "1\n";
- X-f 'agentlog' && print "2\n";
- Xprint "0\n";
- END_OF_FILE
- if test 715 -ne `wc -c <'agent/test/option/L.t'`; then
- echo shar: \"'agent/test/option/L.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/L.t'
- fi
- if test -f 'agent/test/option/V.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/V.t'\"
- else
- echo shar: Extracting \"'agent/test/option/V.t'\" \(693 characters\)
- sed "s/^X//" >'agent/test/option/V.t' <<'END_OF_FILE'
- X# -V: print version number and exits
- X
- X# $Id: V.t,v 3.0 1993/11/29 13:50:12 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: V.t,v $
- X# Revision 3.0 1993/11/29 13:50:12 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- X$version = `$mailagent -V 2>&1`;
- X$? == 0 || print "1\n";
- X$version =~ /PL/ || print "2\n";
- Xprint "0\n";
- END_OF_FILE
- if test 693 -ne `wc -c <'agent/test/option/V.t'`; then
- echo shar: \"'agent/test/option/V.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/V.t'
- fi
- if test -f 'agent/test/option/h.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/h.t'\"
- else
- echo shar: Extracting \"'agent/test/option/h.t'\" \(733 characters\)
- sed "s/^X//" >'agent/test/option/h.t' <<'END_OF_FILE'
- X# -h: print this help message and exits
- X
- X# $Id: h.t,v 3.0 1993/11/29 13:50:17 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: h.t,v $
- X# Revision 3.0 1993/11/29 13:50:17 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- X$output = `$mailagent -h 2>&1`;
- X$? != 0 || print "1\n"; # -h -> exit status 1
- X$* = 1;
- X$output =~ /-h : print/ || print "2\n";
- Xprint "0\n";
- END_OF_FILE
- if test 733 -ne `wc -c <'agent/test/option/h.t'`; then
- echo shar: \"'agent/test/option/h.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/h.t'
- fi
- if test -f 'agent/test/option/o.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/o.t'\"
- else
- echo shar: Extracting \"'agent/test/option/o.t'\" \(763 characters\)
- sed "s/^X//" >'agent/test/option/o.t' <<'END_OF_FILE'
- X# -o: overwrite config file with supplied definition
- X
- X# $Id: o.t,v 3.0 1993/11/29 13:50:18 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: o.t,v $
- X# Revision 3.0 1993/11/29 13:50:18 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- Xchdir '../out';
- Xunlink 'mylog';
- X`$mailagent -d -o 'log: mylog' 2>/dev/null`;
- X$? == 0 || print "1\n";
- X-s 'mylog' || print "2\n";
- Xunlink 'mylog';
- Xprint "0\n";
- END_OF_FILE
- if test 763 -ne `wc -c <'agent/test/option/o.t'`; then
- echo shar: \"'agent/test/option/o.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/o.t'
- fi
- if test -f 'agent/test/option/r.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/r.t'\"
- else
- echo shar: Extracting \"'agent/test/option/r.t'\" \(857 characters\)
- sed "s/^X//" >'agent/test/option/r.t' <<'END_OF_FILE'
- X# -r: sepcify alternate rule file
- X
- X# $Id: r.t,v 3.0 1993/11/29 13:50:20 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: r.t,v $
- X# Revision 3.0 1993/11/29 13:50:20 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- Xchdir '../out';
- X`cp ../rules .rules`;
- X$output = `$mailagent -d 2>/dev/null`;
- X$? == 0 || print "1\n";
- X`cp .rules myrules`;
- X$output_bis = `$mailagent -r myrules -d 2>/dev/null`;
- X$? == 0 || print "2\n";
- X$output eq $output_bis || print "3\n";
- Xunlink 'myrules';
- Xprint "0\n";
- END_OF_FILE
- if test 857 -ne `wc -c <'agent/test/option/r.t'`; then
- echo shar: \"'agent/test/option/r.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/r.t'
- fi
- if test -f 'agent/test/option/what.t' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/option/what.t'\"
- else
- echo shar: Extracting \"'agent/test/option/what.t'\" \(686 characters\)
- sed "s/^X//" >'agent/test/option/what.t' <<'END_OF_FILE'
- X# Make sure invalid option leads to a meaningful exit status
- X
- X# $Id: what.t,v 3.0 1993/11/29 13:50:22 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: what.t,v $
- X# Revision 3.0 1993/11/29 13:50:22 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xdo '../pl/init.pl';
- X`$mailagent -foo -bar 2>&1`;
- X$? != 0 || print "1\n";
- Xprint "0\n";
- END_OF_FILE
- if test 686 -ne `wc -c <'agent/test/option/what.t'`; then
- echo shar: \"'agent/test/option/what.t'\" unpacked with wrong size!
- fi
- # end of 'agent/test/option/what.t'
- fi
- if test -f 'agent/test/pl/init.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/pl/init.pl'\"
- else
- echo shar: Extracting \"'agent/test/pl/init.pl'\" \(911 characters\)
- sed "s/^X//" >'agent/test/pl/init.pl' <<'END_OF_FILE'
- X# Set up mailagent and filter paths
- X
- X# $Id: init.pl,v 3.0 1993/11/29 13:50:24 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: init.pl,v $
- X;# Revision 3.0 1993/11/29 13:50:24 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X
- X$pwd = $ENV{'PWD'}; # Where TEST was invoked from
- X($up) = $pwd =~ m|^(.*)/.*|;
- X$mailagent_prog = $ENV{'MAILAGENT'};
- X$mailagent_path = "$up/$mailagent_prog";
- X$mailagent = "$mailagent_path -TEST";
- X$filter = "$up/filter/filter";
- X
- X# Make sure no lock were left by previous test
- Xunlink "$pwd/out/filter.lock", "$pwd/out/perl.lock";
- END_OF_FILE
- if test 911 -ne `wc -c <'agent/test/pl/init.pl'`; then
- echo shar: \"'agent/test/pl/init.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/test/pl/init.pl'
- fi
- if test -f 'agent/test/pl/misc.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/pl/misc.pl'\"
- else
- echo shar: Extracting \"'agent/test/pl/misc.pl'\" \(776 characters\)
- sed "s/^X//" >'agent/test/pl/misc.pl' <<'END_OF_FILE'
- X# Common actions at the top of each misc test
- X
- X# $Id: misc.pl,v 3.0 1993/11/29 13:50:26 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: misc.pl,v $
- X;# Revision 3.0 1993/11/29 13:50:26 ram
- X;# Baseline for mailagent 3.0 netwide release.
- X;#
- X
- Xdo '../pl/cmd.pl';
- X
- X# Add option to command string held in $cmd
- Xsub add_option {
- X local($opt) = @_;
- X local(@cmd) = split(' ', $cmd);
- X $cmd = join(' ', $cmd[0], $opt, @cmd[1..$#cmd]);
- X}
- X
- END_OF_FILE
- if test 776 -ne `wc -c <'agent/test/pl/misc.pl'`; then
- echo shar: \"'agent/test/pl/misc.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/test/pl/misc.pl'
- fi
- if test -f 'agent/test/pl/mta.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'agent/test/pl/mta.pl'\"
- else
- echo shar: Extracting \"'agent/test/pl/mta.pl'\" \(954 characters\)
- sed "s/^X//" >'agent/test/pl/mta.pl' <<'END_OF_FILE'
- X# Basic MTA/NTA for tests
- X
- X# $Id: mta.pl,v 3.0 1993/11/29 13:50:26 ram Exp ram $
- X#
- X# Copyright (c) 1990-1993, Raphael Manfredi
- X#
- X# You may redistribute only under the terms of the Artistic License,
- X# as specified in the README file that comes with the distribution.
- X# You may reuse parts of this distribution only within the terms of
- X# that same Artistic License; a copy of which may be found at the root
- X# of the source tree for mailagent 3.0.
- X#
- X# $Log: mta.pl,v $
- X# Revision 3.0 1993/11/29 13:50:26 ram
- X# Baseline for mailagent 3.0 netwide release.
- X#
- X
- Xunlink 'send.mail', 'send.news'; # Output from our MTA and NTA
- X
- Xopen(MSEND, '>msend');
- Xprint MSEND <<'EOM';
- X#!/bin/sh
- Xecho "Recipients: $@" >> send.mail
- Xexec cat >> send.mail
- XEOM
- Xclose MSEND;
- X
- Xopen(NSEND, '>nsend');
- Xprint NSEND <<'EOM';
- X#!/bin/sh
- Xexec cat >> send.news
- XEOM
- Xclose NSEND;
- X
- Xchmod 0755, 'msend', 'nsend';
- X
- Xsub clear_mta {
- X unlink 'msend', 'nsend', 'send.mail', 'send.news';
- X}
- X
- END_OF_FILE
- if test 954 -ne `wc -c <'agent/test/pl/mta.pl'`; then
- echo shar: \"'agent/test/pl/mta.pl'\" unpacked with wrong size!
- fi
- # end of 'agent/test/pl/mta.pl'
- fi
- if test -f 'confmagic.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'confmagic.h'\"
- else
- echo shar: Extracting \"'confmagic.h'\" \(742 characters\)
- sed "s/^X//" >'confmagic.h' <<'END_OF_FILE'
- X/*
- X * This file was produced by running metaconfig and is intended to be included
- X * after config.h and after all the other needed includes have been dealt with.
- X *
- X * This file may be empty, and should not be edited. Rerun metaconfig instead.
- X * If you wish to get rid of this magic, remove this file and rerun metaconfig
- X * without the -M option.
- X *
- X * $Id: confmagic.h,v 3.0 1993/11/29 13:50:29 ram Exp ram $
- X */
- X
- X#ifndef _confmagic_h_
- X#define _confmagic_h_
- X
- X#ifndef HAS_BCOPY
- X#ifndef bcopy
- X#define bcopy(s,d,l) memcpy((d),(s),(l))
- X#endif
- X#endif
- X
- X#ifndef HAS_INDEX
- X#ifndef index
- X#define index strchr
- X#endif
- X#endif
- X
- X#ifndef HAS_INDEX
- X#ifndef rindex
- X#define rindex strrchr
- X#endif
- X#endif
- X
- X#ifndef HAS_VFORK
- X#define vfork fork
- X#endif
- X
- X#endif
- END_OF_FILE
- if test 742 -ne `wc -c <'confmagic.h'`; then
- echo shar: \"'confmagic.h'\" unpacked with wrong size!
- fi
- # end of 'confmagic.h'
- fi
- if test -f 'misc/shell/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'misc/shell/README'\"
- else
- echo shar: Extracting \"'misc/shell/README'\" \(974 characters\)
- sed "s/^X//" >'misc/shell/README' <<'END_OF_FILE'
- XThe following command allows the remote execution of arbitrary shell commands.
- XThis may compromise the security of your account and/or system, so be very
- Xcareful when setting it up. Only someone with a 'shell' power will be allowed
- Xto use that command.
- X
- XTo install, add the server.cf lines to your 'comserver' file, as defined in
- Xyour ~/.mailagent, then copy the 'shell' script to your 'servdir'.
- X
- XTo create the 'shell' power, become 'root' or 'system' and then do:
- X
- Xnewpower shell PASSWORD
- X... fill in security clearance ...
- X... (your e-mail address) ...
- XEOF
- X
- XDo not forget to select a good password for this power.
- X
- XHere is an example:
- X
- Xset shell /bin/ksh
- Xpower shell PASSWORD
- Xshell
- Xpwd
- Xls -l
- Xcat ~/.profile
- XEOF
- X
- XThe transcript session will return you the output from the shell. If you
- Xdo not select a shell via 'set shell', then /bin/sh will be used.
- X
- XAt any time, you may remove this remote shell access by commenting out or
- Xremoving the shell command from 'comserver'.
- END_OF_FILE
- if test 974 -ne `wc -c <'misc/shell/README'`; then
- echo shar: \"'misc/shell/README'\" unpacked with wrong size!
- fi
- # end of 'misc/shell/README'
- fi
- if test -f 'misc/unkit/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'misc/unkit/README'\"
- else
- echo shar: Extracting \"'misc/unkit/README'\" \(690 characters\)
- sed "s/^X//" >'misc/unkit/README' <<'END_OF_FILE'
- XThis directory contains the implemetation for a new filtering action UNKIT,
- Xalong with the necessary configuration files. The UNKIT command is used to
- Xautomatically unkit messages produced by the 'kit' binary tar-mailer.
- X
- XMessages are left in a directory until all the kit parts have been received,
- Xat which point 'unkit' is called and the session transcript is mailed back
- Xto the user.
- X
- XThis was inspired by a shell script written by Christian Bertin
- X<bertin@acri.fr> and doing roughly the same thing. This perl version was
- Xmerely written as an exercise to see how easy/uneasy the command extension
- Xprocess was.
- X
- X Raphael Manfredi <ram@eiffel.com>
- X Santa Barbara, CA, USA, March 1st 1993.
- END_OF_FILE
- if test 690 -ne `wc -c <'misc/unkit/README'`; then
- echo shar: \"'misc/unkit/README'\" unpacked with wrong size!
- fi
- # end of 'misc/unkit/README'
- fi
- if test -f 'misc/unkit/mailagent.cf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'misc/unkit/mailagent.cf'\"
- else
- echo shar: Extracting \"'misc/unkit/mailagent.cf'\" \(796 characters\)
- sed "s/^X//" >'misc/unkit/mailagent.cf' <<'END_OF_FILE'
- X#
- X# Configuration for UNKIT
- X#
- X
- Xx_unkit_dir : ~/tmp/unkit # Directory where UNKIT works (default ~/kit)
- Xx_unkit_remove : YES # Remove temporary files upon exctraction
- Xx_unkit_pname : .kpart # Leading temporary file name (default .kp)
- Xx_unkit_opt : -b # Additional unkit option
- Xx_unkit_log : kitlog # Where UNKIT logs what it does
- Xx_unkit_notify : ~/mail/kitok # Message to be sent when kit received
- Xx_unkit_info : README # File name for kit-embeded instructions
- X
- X#
- X# The following are not implemented yet...
- X#
- X
- Xx_unkit_sizemax: 1000000 # Do not automatically unkit past this size
- Xx_unkit_timeout: 3d # Timeout before discarding (3 days)
- Xx_unkit_output : YES # Do we want any output mailed back if ok?
- Xx_unkit_trust : ~/mail/trust # Trusted people list (regexp form)
- X
- END_OF_FILE
- if test 796 -ne `wc -c <'misc/unkit/mailagent.cf'`; then
- echo shar: \"'misc/unkit/mailagent.cf'\" unpacked with wrong size!
- fi
- # end of 'misc/unkit/mailagent.cf'
- fi
- echo shar: End of archive 25 \(of 26\).
- cp /dev/null ark25isdone
- MISSING=""
- 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
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 26 archives.
- echo "Now run 'sh PACKNOTES', then read README and type Configure.'"
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-
- exit 0 # Just in case...
-