home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: Raphael Manfredi <ram@acri.fr>
- Subject: v41i047: mailagent - Flexible mail filtering and processing package, v3.0, Patch03
- Message-ID: <1993Dec19.214021.4700@sparky.sterling.com>
- X-Md4-Signature: 47afdb59d1e777a82a1f6613c695d705
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Advanced Computer Research Institute, Lyon, France
- Date: Sun, 19 Dec 1993 21:40:21 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: Raphael Manfredi <ram@acri.fr>
- Posting-number: Volume 41, Issue 47
- Archive-name: mailagent/patch03
- Environment: UNIX, Perl
- Patch-To: mailagent: Volume 41, Issue 1-26
-
- [The latest patch for mailagent version 3.0 is #3.]
-
- System: mailagent version 3.0
- Patch #: 3
- Priority: LOW
- Subject: updated Configure with new metaconfig
- Subject: now mentions that at least perl 4.0 PL36 is required
- Subject: typo and minor fixes
- Subject: log mesages were not emitted correctly
- Subject: now force . into PATH for msend/nsend
- Subject: extra closing single quote removed (was there since 2.9 PL0)
- Subject: now make sure that filter.lock has correct timestamp
- Date: Wed Dec 15 10:07:10 MET 1993
- From: Raphael Manfredi <ram@acri.fr>
-
- Description:
- README file now mentions that at least perl 4.0 PL36 is required,
- otherwise some tests in the regression test suite will hang or
- fail mysteriously...
-
- Fixed typo and minor bugs in manual page.
-
- Log mesages were not emitted correctly when saving to an MH
- folder and an error occurred.
-
- The TEST wrapper now forces . into PATH for msend/nsend
- (for tests like cmd/message or cmd/post).
-
- Extra closing single quote removed in the agent/test/action
- rule file (was there since 2.9 PL0). Congratulations to
- Shigeya Suzuki <shigeya@foretune.co.jp> who spotted it!
-
- Now make sure that filter.lock has correct timestamp by
- removing it and recreating a new one (basic/filter test).
-
-
- Fix: From rn, say "| patch -p -N -d DIR", where DIR is your mailagent source
- directory. Outside of rn, say "cd DIR; patch -p -N <thisarticle".
- If you don't have the patch program, apply the following by hand,
- or get patch (version 2.0, latest patchlevel).
-
- After patching:
- Configure -ders
- make depend
- make
- make install
- make install.man
-
- If patch indicates that patchlevel is the wrong version, you may need
- to apply one or more previous patches, or the patch may already
- have been applied. See the patchlevel.h file to find out what has or
- has not been applied. In any event, don't continue with the patch.
-
- If you are missing previous patches they can be obtained from me:
-
- Raphael Manfredi <ram@acri.fr>
-
- If you send a mail message of the following form it will greatly speed
- processing:
-
- Subject: Command
- @SH mailpatch PATH mailagent 3.0 LIST
- ^ note the c
-
- where PATH is a return path FROM ME TO YOU either in Internet notation,
- or in bang notation from some well-known host, and LIST is the number
- of one or more patches you need, separated by spaces, commas, and/or
- hyphens. Saying 35- says everything from 35 to the end.
-
- To get some more detailed instructions, send me the following mail:
-
- Subject: Command
- @SH mailhelp PATH
-
-
- Index: patchlevel.h
- Prereq: 2
- 4c4
- < #define PATCHLEVEL 2
- ---
- > #define PATCHLEVEL 3
-
- Index: Configure
- Prereq: 3.0.1.1
- *** Configure.old Wed Dec 15 10:06:59 1993
- --- Configure Wed Dec 15 10:07:00 1993
- ***************
- *** 18,26 ****
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 3.0.1.1 1993/11/29 16:43:28 ram Exp $
- #
- ! # Generated on Mon Nov 29 17:39:26 MET 1993 [metaconfig 3.0 PL14]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- --- 18,26 ----
- # archive site. Check with Archie if you don't know where that can be.)
- #
-
- ! # $Id: Configure,v 3.0.1.2 1993/12/15 09:02:26 ram Exp $
- #
- ! # Generated on Wed Dec 15 09:55:57 MET 1993 [metaconfig 3.0 PL15]
-
- cat >/tmp/c1$$ <<EOF
- ARGGGHHHH!!!!!
- ***************
- *** 52,57 ****
- --- 52,58 ----
- PATH=$PATH:'/sys5.3/bin:/sys5.3/usr/bin:/bsd4.3/bin:/bsd4.3/usr/ucb'
- PATH=$PATH:'/bsd4.3/usr/bin:/usr/bsd:/bsd43/bin:/usr/ccs/bin'
- PATH=$PATH:'/etc:/usr/lib:/usr/ucblib:/lib:/usr/ccs/lib'
- + PATH=$PATH:'/sbin:/usr/sbin:/usr/libexec'
- export PATH
-
- if test ! -t 0; then
- ***************
- *** 178,184 ****
- --- 179,187 ----
- cf_by=''
- cf_time=''
- contains=''
- + cpplast=''
- cppminus=''
- + cpprun=''
- cppstdin=''
- d_bcopy=''
- d_flock=''
- ***************
- *** 414,420 ****
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -V) echo "Configure generated by metaconfig 3.0 PL14." >&2
- exit 0;;
- --) break;;
- -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
- --- 417,423 ----
- -s) shift; silent=true;;
- -E) shift; alldone=exit;;
- -S) shift; extractsh=true;;
- ! -V) echo "Configure generated by metaconfig 3.0 PL15." >&2
- exit 0;;
- --) break;;
- -*) echo "Configure: unknown option $1" >&2; shift; error=true;;
- ***************
- *** 489,495 ****
- fi
-
- : list of known cpp symbols
- ! attrlist="__alpha DGUX M_I186 M_I286 M_I386 M_I8086 M_XENIX UTS __DGUX__"
- attrlist="$attrlist _AIX __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
- attrlist="$attrlist hp9000s300 hp9000s400 hp9000s500 hp9000s700"
- attrlist="$attrlist hp9000s800 hpux"
- --- 492,499 ----
- fi
-
- : list of known cpp symbols
- ! attrlist="__alpha __bsdi__ BSD_NET2 DGUX M_I186 M_I286 M_I386"
- ! attrlist="$attrlist M_I8086 M_XENIX UTS __DGUX__"
- attrlist="$attrlist _AIX __STDC__ __m88k__ ansi bsd4_2 gcos gimpel"
- attrlist="$attrlist hp9000s300 hp9000s400 hp9000s500 hp9000s700"
- attrlist="$attrlist hp9000s800 hpux"
- ***************
- *** 1078,1084 ****
- case "$ans" in
- y*) d_portable="$define"
- for file in $loclist $trylist; do
- ! eval $file="\$_$file"
- done
- ;;
- *) d_portable="$undef" ;;
- --- 1082,1088 ----
- case "$ans" in
- y*) d_portable="$define"
- for file in $loclist $trylist; do
- ! eval $file="\$file"
- done
- ;;
- *) d_portable="$undef" ;;
- ***************
- *** 2518,2583 ****
- echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- chmod 755 cppstdin
- wrapper=`pwd`/cppstdin
- cd UU
- if $test "X$cppstdin" != "X" && \
- $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "You used to use $cppstdin $cppminus so we'll use that again."
- ! elif $test "$cc" = gcc && \
- ! (echo "Using gcc, eh? We'll try to force gcc -E using a wrapper..."; \
- ! $wrapper <testcpp.c >testcpp.out 2>&1; \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1) ; then
- ! echo "Yup, we can."
- ! cppstdin="$wrapper"
- ! cppminus='';
- elif echo 'Maybe "'"$cc"' -E" will work...'; \
- $cc -E <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- ! cppstdin="$cc -E"
- ! cppminus='';
- elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- $cc -E - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- ! cppstdin="$cc -E"
- ! cppminus='-';
- ! elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- ! $cpp <testcpp.c >testcpp.out 2>&1; \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! echo "It works!"
- ! cppstdin="$cpp"
- ! cppminus='';
- ! elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- ! $cpp - <testcpp.c >testcpp.out 2>&1; \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! echo "Hooray, it works! I was beginning to wonder."
- ! cppstdin="$cpp"
- ! cppminus='-';
- elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- $cc -P <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yipee, that works!"
- ! cppstdin="$cc -P"
- ! cppminus='';
- elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- $cc -P - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "At long last!"
- ! cppstdin="$cc -P"
- ! cppminus='-';
- elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- $wrapper <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! cppstdin="$wrapper"
- ! cppminus=''
- echo "Eureka!"
- else
- dflt=''
- rp="No dice. I can't find a C preprocessor. Name one:"
- . ./myread
- ! cppstdin="$ans"
- ! $cppstdin <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "OK, that will do." >&4
- else
- --- 2522,2608 ----
- echo 'cat >.$$.c; '"$cc"' -E ${1+"$@"} .$$.c; rm .$$.c' >cppstdin
- chmod 755 cppstdin
- wrapper=`pwd`/cppstdin
- + ok='false'
- cd UU
- +
- if $test "X$cppstdin" != "X" && \
- $cppstdin $cppminus <testcpp.c >testcpp.out 2>&1 && \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- ! then
- echo "You used to use $cppstdin $cppminus so we'll use that again."
- ! case "$cpprun" in
- ! '') echo "But let's see if we can live without a wrapper..." ;;
- ! *)
- ! if $cpprun $cpplast <testcpp.c >testcpp.out 2>&1 && \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- ! then
- ! echo "(And we'll use $cpprun $cpplast to preprocess directly.)"
- ! ok='true'
- ! else
- ! echo "(However, $cpprun $cpplast does not work, let's see...)"
- ! fi
- ! ;;
- ! esac
- ! else
- ! case "$cppstdin" in
- ! '') ;;
- ! *)
- ! echo "Good old $cppstdin $cppminus does not seem to be of any help..."
- ! ;;
- ! esac
- ! fi
- !
- ! if $ok; then
- ! : nothing
- elif echo 'Maybe "'"$cc"' -E" will work...'; \
- $cc -E <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- ! x_cpp="$cc -E"
- ! x_minus='';
- elif echo 'Nope...maybe "'"$cc"' -E -" will work...'; \
- $cc -E - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yup, it does."
- ! x_cpp="$cc -E"
- ! x_minus='-';
- elif echo 'Nope...maybe "'"$cc"' -P" will work...'; \
- $cc -P <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "Yipee, that works!"
- ! x_cpp="$cc -P"
- ! x_minus='';
- elif echo 'Nope...maybe "'"$cc"' -P -" will work...'; \
- $cc -P - <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "At long last!"
- ! x_cpp="$cc -P"
- ! x_minus='-';
- ! elif echo 'No such luck, maybe "'$cpp'" will work...'; \
- ! $cpp <testcpp.c >testcpp.out 2>&1; \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! echo "It works!"
- ! x_cpp="$cpp"
- ! x_minus='';
- ! elif echo 'Nixed again...maybe "'$cpp' -" will work...'; \
- ! $cpp - <testcpp.c >testcpp.out 2>&1; \
- ! $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! echo "Hooray, it works! I was beginning to wonder."
- ! x_cpp="$cpp"
- ! x_minus='-';
- elif echo 'Uh-uh. Time to get fancy. Trying a wrapper...'; \
- $wrapper <testcpp.c >testcpp.out 2>&1; \
- $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- ! x_cpp="$wrapper"
- ! x_minus=''
- echo "Eureka!"
- else
- dflt=''
- rp="No dice. I can't find a C preprocessor. Name one:"
- . ./myread
- ! x_cpp="$ans"
- ! x_minus=''
- ! $x_cpp <testcpp.c >testcpp.out 2>&1
- if $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1 ; then
- echo "OK, that will do." >&4
- else
- ***************
- *** 2585,2590 ****
- --- 2610,2647 ----
- exit 1
- fi
- fi
- +
- + case "$ok" in
- + false)
- + cppstdin="$x_cpp"
- + cppminus="$x_minus"
- + cpprun="$x_cpp"
- + cpplast="$x_minus"
- + set X $x_cpp
- + shift
- + case "$1" in
- + "$cpp")
- + echo "Perhaps can we force $cc -E using a wrapper..."
- + if $wrapper <testcpp.c >testcpp.out 2>&1; \
- + $contains 'abc.*xyz' testcpp.out >/dev/null 2>&1
- + then
- + echo "Yup, we can."
- + cppstdin="$wrapper"
- + cppminus='';
- + else
- + echo "Nope, we'll have to live without it..."
- + fi
- + ;;
- + esac
- + case "$cpprun" in
- + "$wrapper")
- + cpprun=''
- + cpplast=''
- + ;;
- + esac
- + ;;
- + esac
- +
- case "$cppstdin" in
- "$wrapper") ;;
- *) $rm -f $wrapper;;
- ***************
- *** 3158,3164 ****
-
- : determine where mail is spooled
- case "$maildir" in
- ! '') dflt=`./loc . /usr/spool/mail /usr/spool/mail /usr/mail`;;
- *) dflt="$maildir";;
- esac
- echo " "
- --- 3215,3221 ----
-
- : determine where mail is spooled
- case "$maildir" in
- ! '') dflt=`./loc . /usr/spool/mail /usr/spool/mail /usr/mail /var/mail`;;
- *) dflt="$maildir";;
- esac
- echo " "
- ***************
- *** 3201,3207 ****
- : determine where mail is spooled
- case "$mailfile" in
- '')
- ! dflt=`./loc . XXX /usr/spool/mail /usr/mail`
- case "$dflt" in
- XXX) dflt='%~/mailbox';;
- *) dflt="$dflt/%L";;
- --- 3258,3264 ----
- : determine where mail is spooled
- case "$mailfile" in
- '')
- ! dflt=`./loc . XXX /usr/spool/mail /usr/mail /var/mail`
- case "$dflt" in
- XXX) dflt='%~/mailbox';;
- *) dflt="$dflt/%L";;
- ***************
- *** 3265,3270 ****
- --- 3322,3328 ----
- do
- $cpp -M -I. $cppflags \$flags \$srcfile 2>/dev/null
- done
- + exit 0
- EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- ***************
- *** 3288,3293 ****
- --- 3346,3352 ----
- do
- $cc -MM -I. $cppflags \$flags \$srcfile 2>/dev/null
- done
- + exit 0
- EOM
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- ***************
- *** 3322,3327 ****
- --- 3381,3387 ----
- -e 's|: *$|: '\$srcfile'|' | \\
- $grep -v '^#' | $sort | $uniq
- done
- + exit 0
- EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- ***************
- *** 3383,3388 ****
- --- 3443,3449 ----
- IFS=' '
- $rm -f /tmp/mkdep\$\$
- done
- + exit 0
- EOS
- mkdep=$toplev/mkdep
- chmod +x $mkdep
- ***************
- *** 4234,4240 ****
- --- 4295,4303 ----
- cf_by='$cf_by'
- cf_time='$cf_time'
- contains='$contains'
- + cpplast='$cpplast'
- cppminus='$cppminus'
- + cpprun='$cpprun'
- cppstdin='$cppstdin'
- d_bcopy='$d_bcopy'
- d_flock='$d_flock'
-
- Index: agent/man/mailagent.SH
- Prereq: 3.0
- *** agent/man/mailagent.SH.old Wed Dec 15 10:07:04 1993
- --- agent/man/mailagent.SH Wed Dec 15 10:07:05 1993
- ***************
- *** 20,26 ****
- .TH MAILAGENT $manext "Version $VERSION PL$PATCHLEVEL"
- ''' @(#) Manual page for mailagent's filter -- (c) ram February 1991
- '''
- ! ''' $Id: mailagent.SH,v 3.0 1993/11/29 13:48:27 ram Exp $
- '''
- ''' Copyright (c) 1990-1993, Raphael Manfredi
- '''
- --- 20,26 ----
- .TH MAILAGENT $manext "Version $VERSION PL$PATCHLEVEL"
- ''' @(#) Manual page for mailagent's filter -- (c) ram February 1991
- '''
- ! ''' $Id: mailagent.SH,v 3.0.1.1 1993/12/15 09:03:44 ram Exp $
- '''
- ''' Copyright (c) 1990-1993, Raphael Manfredi
- '''
- ***************
- *** 31,36 ****
- --- 31,39 ----
- ''' of the source tree for mailagent 3.0.
- '''
- ''' $Log: mailagent.SH,v $
- + ''' Revision 3.0.1.1 1993/12/15 09:03:44 ram
- + ''' patch3: typo and minor fixes
- + '''
- ''' Revision 3.0 1993/11/29 13:48:27 ram
- ''' Baseline for mailagent 3.0 netwide release.
- '''
- ***************
- *** 1975,1981 ****
- .I new(name, value, type)
- Replace or create a %-(name) macro. For instance:
- .Ex
- ! new('foo', "$mailhook'header{'X-Foo'}", 'EXPR');
- .Ef
- would create a new macro \fIfoo\fR that would expand into the value of
- an hypothetical \fIX-Foo\fR header.
- --- 1978,1984 ----
- .I new(name, value, type)
- Replace or create a %-(name) macro. For instance:
- .Ex
- ! new('foo', "\$mailhook'header{'X-Foo'}", 'EXPR');
- .Ef
- would create a new macro \fIfoo\fR that would expand into the value of
- an hypothetical \fIX-Foo\fR header.
- ***************
- *** 3275,3281 ****
- with the \fIroot\fR power can do virtually anything with the server, so be
- careful. Let's assume you choose \fIroot-pass\fR as a password.
- .PP
- ! Edit \fIpasswd\fR (defined in your \fI~/.mailagent\fR and add the following
- line:
- .Ex
- root:<root-pass>:
- --- 3278,3284 ----
- with the \fIroot\fR power can do virtually anything with the server, so be
- careful. Let's assume you choose \fIroot-pass\fR as a password.
- .PP
- ! Edit \fIpasswd\fR (defined in your \fI~/.mailagent\fR) and add the following
- line:
- .Ex
- root:<root-pass>:
- ***************
- *** 3291,3305 ****
- .PP
- You are almost done. Now simply issue the following command:
- .Ex
- From: \fIyour e-mail address\fR
-
- power root root-pass
- password root root-pass
- .Ef
- ! and feed that to:
- ! .Ex
- ! mailagent -i -e 'SERVER -t'
- ! .Ef
- The side effect of re-instantiating your password will be to crypt it in
- the \fIpasswd\fR file, so that anybody looking at that file cannot guess
- your \fIroot\fR password, hopefully.
- --- 3294,3315 ----
- .PP
- You are almost done. Now simply issue the following command:
- .Ex
- + mailagent -i -e 'SERVER -t'
- + .Ef
- + and feed its standard input with:
- + .Ex
- + From \fIyour e-mail address\fR
- From: \fIyour e-mail address\fR
-
- power root root-pass
- password root root-pass
- + ^D
- .Ef
- ! Note that the first \fIFrom\fR line is mandatory here, since it's the
- ! envelope on which authentication is based. Since we're feeding mailagent
- ! with an handcrafted message, we must provide a valid envelope or the
- ! server will not switch into trusted mode...
- ! .PP
- The side effect of re-instantiating your password will be to crypt it in
- the \fIpasswd\fR file, so that anybody looking at that file cannot guess
- your \fIroot\fR password, hopefully.
-
- Index: agent/pl/mh.pl
- Prereq: 3.0
- *** agent/pl/mh.pl.old Wed Dec 15 10:07:06 1993
- --- agent/pl/mh.pl Wed Dec 15 10:07:07 1993
- ***************
- *** 1,4 ****
- ! ;# $Id: mh.pl,v 3.0 1993/11/29 13:49:02 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: mh.pl,v 3.0.1.1 1993/12/15 09:04:12 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: mh.pl,v $
- + ;# Revision 3.0.1.1 1993/12/15 09:04:12 ram
- + ;# patch3: log mesages were not emitted correctly
- + ;#
- ;# Revision 3.0 1993/11/29 13:49:02 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 75,81 ****
- local($size) = -s $name;
-
- &'add_log("ERROR $name has $size bytes (should have $amount)")
- ! if $size != $amount && $loglvl;
-
- $failed = 1 if $size != $amount;
-
- --- 78,84 ----
- local($size) = -s $name;
-
- &'add_log("ERROR $name has $size bytes (should have $amount)")
- ! if $size != $amount && $'loglvl;
-
- $failed = 1 if $size != $amount;
-
- ***************
- *** 154,160 ****
-
- # Now sort in ascending order and get highest number
- @dir = sort { $a <=> $b; } @dir;
- ! local($highest) = pop(@dir);
-
- # Now create new message before unlocking the directory. Use appending
- # instead of plain creation in case our lock was not honoured for some
- --- 157,163 ----
-
- # Now sort in ascending order and get highest number
- @dir = sort { $a <=> $b; } @dir;
- ! local($highest) = pop(@dir) || 0; # Ensure numeric default value
-
- # Now create new message before unlocking the directory. Use appending
- # instead of plain creation in case our lock was not honoured for some
- ***************
- *** 162,168 ****
- $highest++;
- local($new) = "$dir/$msg_prefix$highest";
- unless (open(NEW, ">>$new")) {
- ! &'add_log("ERROR cannot create $msg: $!") if $'loglvl > 1;
- $new = 0; # Signal no creation (directory still locked)
- } else {
- close NEW; # File is now created
- --- 165,171 ----
- $highest++;
- local($new) = "$dir/$msg_prefix$highest";
- unless (open(NEW, ">>$new")) {
- ! &'add_log("ERROR cannot create $new: $!") if $'loglvl > 1;
- $new = 0; # Signal no creation (directory still locked)
- } else {
- close NEW; # File is now created
-
- Index: agent/test/basic/filter.t
- Prereq: 3.0
- *** agent/test/basic/filter.t.old Wed Dec 15 10:07:09 1993
- --- agent/test/basic/filter.t Wed Dec 15 10:07:09 1993
- ***************
- *** 1,6 ****
- # Make sure filter queues messages correctly
-
- ! # $Id: filter.t,v 3.0 1993/11/29 13:49:24 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 1,6 ----
- # Make sure filter queues messages correctly
-
- ! # $Id: filter.t,v 3.0.1.1 1993/12/15 09:05:53 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 11,16 ****
- --- 11,19 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: filter.t,v $
- + # Revision 3.0.1.1 1993/12/15 09:05:53 ram
- + # patch3: now make sure that filter.lock has correct timestamp
- + #
- # Revision 3.0 1993/11/29 13:49:24 ram
- # Baseline for mailagent 3.0 netwide release.
- #
- ***************
- *** 55,63 ****
- $file = <queue/qm*>;
- -f "$file" || print "13\n"; # Must have been left in queue
- unlink "$file", 'agentlog';
- # Make sure file is correctly queued when another filter is running
- ! `cp /dev/null filter.lock`;
- $? == 0 || print "14\n";
- open(FILTER, "|$filter -t >/dev/null 2>&1") || print "15\n";
- print FILTER <<EOF;
- Dummy mail
- --- 58,69 ----
- $file = <queue/qm*>;
- -f "$file" || print "13\n"; # Must have been left in queue
- unlink "$file", 'agentlog';
- +
- # Make sure file is correctly queued when another filter is running
- ! unlink 'filter.lock'; # In case an old one remains
- ! `cp /dev/null filter.lock`; # Make sure we have a new fresh one
- $? == 0 || print "14\n";
- +
- open(FILTER, "|$filter -t >/dev/null 2>&1") || print "15\n";
- print FILTER <<EOF;
- Dummy mail
-
- Index: agent/test/TEST
- Prereq: 3.0
- *** agent/test/TEST.old Wed Dec 15 10:07:07 1993
- --- agent/test/TEST Wed Dec 15 10:07:07 1993
- ***************
- *** 2,8 ****
- eval 'exec perl -S $0 "$@"'
- if $running_under_some_shell;
-
- ! # $Id: TEST,v 3.0 1993/11/29 13:49:22 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 2,8 ----
- eval 'exec perl -S $0 "$@"'
- if $running_under_some_shell;
-
- ! # $Id: TEST,v 3.0.1.1 1993/12/15 09:04:45 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 13,18 ****
- --- 13,21 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: TEST,v $
- + # Revision 3.0.1.1 1993/12/15 09:04:45 ram
- + # patch3: now force . into PATH for msend/nsend
- + #
- # Revision 3.0 1993/11/29 13:49:22 ram
- # Baseline for mailagent 3.0 netwide release.
- #
- ***************
- *** 36,42 ****
- $mailagent = 'mailagent'; # Default program (dataloaded version)
- $mailagent = 'magent' if $opt_n; # Use non-dataloaded version
- $ENV{'MAILAGENT'} = $mailagent;
- ! $ENV{'PATH'} = "$pwd/..:" . $ENV{'PATH'};
-
- -f "../$mailagent" && -x _ || die "No $mailagent.\n";
- -f '../filter/filter' && -x _ || die "No filter.\n";
- --- 39,45 ----
- $mailagent = 'mailagent'; # Default program (dataloaded version)
- $mailagent = 'magent' if $opt_n; # Use non-dataloaded version
- $ENV{'MAILAGENT'} = $mailagent;
- ! $ENV{'PATH'} = "$pwd/..:.:" . $ENV{'PATH'};
-
- -f "../$mailagent" && -x _ || die "No $mailagent.\n";
- -f '../filter/filter' && -x _ || die "No filter.\n";
-
- Index: agent/test/actions
- Prereq: 3.0
- *** agent/test/actions.old Wed Dec 15 10:07:08 1993
- --- agent/test/actions Wed Dec 15 10:07:08 1993
- ***************
- *** 2,8 ****
- # Mailagent rules for action regression tests
- #
-
- ! # $Id: actions,v 3.0 1993/11/29 13:49:23 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 2,8 ----
- # Mailagent rules for action regression tests
- #
-
- ! # $Id: actions,v 3.0.1.1 1993/12/15 09:05:21 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 13,18 ****
- --- 13,21 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: actions,v $
- + # Revision 3.0.1.1 1993/12/15 09:05:21 ram
- + # patch3: extra closing single quote removed (was there since 2.9 PL0)
- + #
- # Revision 3.0 1993/11/29 13:49:23 ram
- # Baseline for mailagent 3.0 netwide release.
- #
- ***************
- *** 48,54 ****
- ASSIGN other try;
- ASSIGN final '%#other.2';
- ASSIGN :ram 1 + 2;
- ! RUN /bin/echo '%#ram,%#other,%#final' > output';
- }
-
- X-Tag: /assign #2/
- --- 51,57 ----
- ASSIGN other try;
- ASSIGN final '%#other.2';
- ASSIGN :ram 1 + 2;
- ! RUN /bin/echo '%#ram,%#other,%#final' > output;
- }
-
- X-Tag: /assign #2/
-
- Index: README
- *** README.old Wed Dec 15 10:07:02 1993
- --- README Wed Dec 15 10:07:02 1993
- ***************
- *** 13,18 ****
- --- 13,20 ----
- Artistic License for more details.
- ------------------------------------------------------------------------
-
- + This version of mailagent requires you to have at least perl 4.0 PL36.
- +
- Please read all the directions below before you proceed any further, and
- then follow them carefully.
-
-
- *** End of Patch 3 ***
-
- exit 0 # Just in case...
-