home *** CD-ROM | disk | FTP | other *** search
- From: Raphael Manfredi <ram@acri.fr>
- Newsgroups: comp.sources.misc
- Subject: v44i090: mailagent - Flexible mail filtering and processing package, v3.0, Patch16
- Date: 22 Sep 1994 12:13:45 -0500
- Organization: Advanced Computer Research Institute, Lyon, France
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <35se09$r6d@sparky.sterling.com>
- X-Md4-Signature: 2975c8785801f98459d2b74b3bcff527
-
- Submitted-by: Raphael Manfredi <ram@acri.fr>
- Posting-number: Volume 44, Issue 90
- Archive-name: mailagent/patch16
- Environment: UNIX, Perl
- Patch-To: mailagent: Volume 41, Issue 1-26
-
- [The latest patch for mailagent version 3.0 is #16.]
-
- System: mailagent version 3.0
- Patch #: 16
- Priority: MEDIUM
- Subject: patch #12, continued
- Date: Thu Sep 22 17:04:40 MET DST 1994
- From: Raphael Manfredi <ram@acri.fr>
-
- Description:
- See patch #12.
-
-
- 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: 15
- 4c4
- < #define PATCHLEVEL 15
- ---
- > #define PATCHLEVEL 16
-
- Index: agent/pl/once.pl
- Prereq: 3.0
- *** agent/pl/once.pl.old Thu Sep 22 16:43:18 1994
- --- agent/pl/once.pl Thu Sep 22 16:43:18 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: once.pl,v 3.0 1993/11/29 13:49:04 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: once.pl,v 3.0.1.1 1994/09/22 14:28:42 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: once.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:28:42 ram
- + ;# patch12: removed useless test which prevented correct processing
- + ;#
- ;# Revision 3.0 1993/11/29 13:49:04 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 26,35 ****
- local($ok) = 1; # Is once ok ?
- local($timestamp) = 0; # Time stamp attached to entry
- local($linenum) = 0; # Line where entry was found
- ! if (-f $file) {
- ! ($timestamp, $linenum) = &dbr'info($hname, 'ONCE', $tag);
- ! return 0 if $timestamp == -1; # An error occurred
- ! }
- local($now) = time; # Number of seconds since The Epoch
- if (($timestamp + $period) > $now) {
- &'add_log("we have to wait for ($hname, $tag)") if $'loglvl > 18;
- --- 29,36 ----
- local($ok) = 1; # Is once ok ?
- local($timestamp) = 0; # Time stamp attached to entry
- local($linenum) = 0; # Line where entry was found
- ! ($timestamp, $linenum) = &dbr'info($hname, 'ONCE', $tag);
- ! return 0 if $timestamp == -1; # An error occurred
- local($now) = time; # Number of seconds since The Epoch
- if (($timestamp + $period) > $now) {
- &'add_log("we have to wait for ($hname, $tag)") if $'loglvl > 18;
-
- Index: agent/files/mailagent.cf
- Prereq: 3.0.1.2
- *** agent/files/mailagent.cf.old Thu Sep 22 16:42:49 1994
- --- agent/files/mailagent.cf Thu Sep 22 16:42:50 1994
- ***************
- *** 2,8 ****
- # Configuration file for mailagent
- #
-
- ! # $Id: mailagent.cf,v 3.0.1.2 1994/07/01 14:51:36 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 2,8 ----
- # Configuration file for mailagent
- #
-
- ! # $Id: mailagent.cf,v 3.0.1.3 1994/09/22 13:44:11 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 13,18 ****
- --- 13,21 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: mailagent.cf,v $
- + # Revision 3.0.1.3 1994/09/22 13:44:11 ram
- + # patch12: new config parameters callout and linkdirs
- + #
- # Revision 3.0.1.2 1994/07/01 14:51:36 ram
- # patch8: eleven new config variables for better tuning
- #
- ***************
- *** 69,74 ****
- --- 72,78 ----
- queue : $spool/queue # Queue directory (must exist)
- logdir : ~/var/log # Where logfile is stored
- context : $spool/context # Mailagent's context file
- + callout : $spool/callout # Callout queue
- log : agentlog # Log file is in $logdir
- seq : .seq # Seq file is in $spool
- timezone : PST8PDT # Time zone location
- ***************
- *** 77,82 ****
- --- 81,87 ----
- rulecache: $spool/rulecache # Cache for compiled rules (optional)
- nfslock : OFF # NFS-secure locking (optional)
- secure : ON # Make extended checks on sensitive files
- + linkdirs : ON # Also carefully check symlinks to dirs
-
- # Mailbox parameters
- maildrop : /usr/mail # System mail drop directory (optional)
-
- Index: agent/test/cmd/do.t
- *** agent/test/cmd/do.t.old Thu Sep 22 16:43:29 1994
- --- agent/test/cmd/do.t Thu Sep 22 16:43:29 1994
- ***************
- *** 0 ****
- --- 1,61 ----
- + # Test DO command
- +
- + # $Id: do.t,v 3.0.1.1 1994/09/22 14:41:01 ram Exp $
- + #
- + # Copyright (c) 1990-1993, Raphael Manfredi
- + #
- + # You may redistribute only under the terms of the Artistic License,
- + # as specified in the README file that comes with the distribution.
- + # You may reuse parts of this distribution only within the terms of
- + # that same Artistic License; a copy of which may be found at the root
- + # of the source tree for mailagent 3.0.
- + #
- + # $Log: do.t,v $
- + # Revision 3.0.1.1 1994/09/22 14:41:01 ram
- + # patch12: created
- + #
- +
- + do '../pl/cmd.pl';
- + sub cleanup {
- + unlink 'perl.1', 'perl.2', 'never', 'always', 'always.2';
- + }
- +
- + &cleanup;
- + open(PERL, ">perl.1") || print "1\n";
- + print PERL <<'EOP';
- + sub perl_1 {
- + local($name) = @_;
- + &mailhook'save($name);
- + }
- + EOP
- + close PERL;
- +
- + open(PERL, ">perl.2") || print "2\n";
- + print PERL <<'EOP';
- + sub perl_2 {
- + return if defined &main'perl_1;
- + return unless defined &__test__'perl_1;
- + local($mode) = @_;
- + &mailhook'reject($mode);
- + }
- +
- + sub __foo__'perl_3 {
- + local($name) = @_;
- + return unless defined &perl_2;
- + return if defined $name;
- + &mailhook'abort;
- + }
- + EOP
- + close PERL;
- +
- + &add_header('X-Tag: do');
- + `$cmd`;
- + $? == 0 || print "3\n";
- + -f "$user" && print "4\n";
- + -f 'never' && print "5\n";
- + -f 'always' || print "6\n";
- + -f 'always.2' || print "7\n";
- +
- + unlink 'mail';
- + &cleanup;
- + print "0\n";
-
- Index: agent/pl/checklock.pl
- Prereq: 3.0.1.1
- *** agent/pl/checklock.pl.old Thu Sep 22 16:43:07 1994
- --- agent/pl/checklock.pl Thu Sep 22 16:43:07 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: checklock.pl,v 3.0.1.1 1994/07/01 15:00:20 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: checklock.pl,v 3.0.1.2 1994/09/22 14:15:13 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: checklock.pl,v $
- + ;# Revision 3.0.1.2 1994/09/22 14:15:13 ram
- + ;# patch12: localized variables used by stat()
- + ;#
- ;# Revision 3.0.1.1 1994/07/01 15:00:20 ram
- ;# patch8: now honours new lockhold config variable for lock breaking
- ;#
- ***************
- *** 24,30 ****
- local($lockfile) = $file . $lockext; # Add lock extension
- if (-f $lockfile) {
- # There is a lock file -- look for how long it's been there
- ! ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks) = stat($lockfile);
- if ((time - $mtime) > $cf'lockhold) {
- # More than outdating time!! Something must have gone wrong
- --- 27,33 ----
- local($lockfile) = $file . $lockext; # Add lock extension
- if (-f $lockfile) {
- # There is a lock file -- look for how long it's been there
- ! local($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
- $atime,$mtime,$ctime,$blksize,$blocks) = stat($lockfile);
- if ((time - $mtime) > $cf'lockhold) {
- # More than outdating time!! Something must have gone wrong
-
- Index: agent/pl/package.pl
- *** agent/pl/package.pl.old Thu Sep 22 16:43:18 1994
- --- agent/pl/package.pl Thu Sep 22 16:43:18 1994
- ***************
- *** 0 ****
- --- 1,44 ----
- + ;# $Id: package.pl,v 3.0.1.1 1994/09/22 14:29:07 ram Exp $
- + ;#
- + ;# Copyright (c) 1990-1993, Raphael Manfredi
- + ;#
- + ;# You may redistribute only under the terms of the Artistic License,
- + ;# as specified in the README file that comes with the distribution.
- + ;# You may reuse parts of this distribution only within the terms of
- + ;# that same Artistic License; a copy of which may be found at the root
- + ;# of the source tree for mailagent 3.0.
- + ;#
- + ;# $Log: package.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:29:07 ram
- + ;# patch12: created
- + ;#
- + ;#
- + # Get at the .package file, created by the dist program packinit.
- + # Returns true if package file was read and sourced correctly within
- + # the pkg package, false otherwise (in which case we are likely not to
- + # be within a package source tree).
- + sub read_package {
- + local($pack) = '.package';
- + unless (-f $pack) {
- + local(@path) = ( '..', '../..', '../../..', '../../../..');
- + foreach $dir (@path) {
- + if (-f "$dir/$pack") {
- + $pack = "$dir/$pack";
- + last;
- + }
- + }
- + }
- + return 0 unless -f $pack;
- + open(PACKAGE, $pack) || return 0;
- + while (<PACKAGE>) {
- + next if /^:/;
- + next if /^#/;
- + if (($var,$val) = /^\s*(\w+)=(.*)/) {
- + $val = "\"$val\"" unless $val =~ /^['"]/;
- + eval "\$pkg'$var = $val;";
- + }
- + }
- + close PACKAGE;
- + return 1;
- + }
- +
-
- Index: agent/pl/history.pl
- Prereq: 3.0.1.1
- *** agent/pl/history.pl.old Thu Sep 22 16:43:13 1994
- --- agent/pl/history.pl Thu Sep 22 16:43:13 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: history.pl,v 3.0.1.1 1994/01/26 09:32:54 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: history.pl,v 3.0.1.2 1994/09/22 14:22:10 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: history.pl,v $
- + ;# Revision 3.0.1.2 1994/09/22 14:22:10 ram
- + ;# patch12: added escapes in regexp for perl5 support
- + ;#
- ;# Revision 3.0.1.1 1994/01/26 09:32:54 ram
- ;# patch5: history can now handle distinct tags on messages
- ;#
- ***************
- *** 39,45 ****
- # message id, which is the case unless the address is in uucp form.
- $msg_id = $Header{'Date'};
- local($from, $comment) = &parse_address($Header{'From'});
- ! $from =~ s/^([\w-.]+)!([\w-.]+)/@$1:$2/; # host!user -> @host:user
- $msg_id .= '.' . $from if $msg_id;
- }
- $msg_id =~ s/\s+/./g; # Suppress all spaces
- --- 42,48 ----
- # message id, which is the case unless the address is in uucp form.
- $msg_id = $Header{'Date'};
- local($from, $comment) = &parse_address($Header{'From'});
- ! $from =~ s/^([\w-.]+)!([\w-.]+)/\@$1:$2/; # host!user -> @host:user
- $msg_id .= '.' . $from if $msg_id;
- }
- $msg_id =~ s/\s+/./g; # Suppress all spaces
-
- Index: agent/pl/add_log.pl
- Prereq: 3.0
- *** agent/pl/add_log.pl.old Thu Sep 22 16:43:04 1994
- --- agent/pl/add_log.pl Thu Sep 22 16:43:04 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: add_log.pl,v 3.0 1993/11/29 13:48:34 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: add_log.pl,v 3.0.1.1 1994/09/22 14:08:11 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: add_log.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:08:11 ram
- + ;# patch12: now escapes square brackets in strings for perl5
- + ;#
- ;# Revision 3.0 1993/11/29 13:48:34 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 106,112 ****
- localtime(time);
- $date = sprintf("%.2d/%.2d/%.2d %.2d:%.2d:%.2d",
- $year,++$mon,$mday,$hour,$min,$sec);
- ! $log = $date . " $'prog_name[$'jobnum]: $msg\n";
-
- # If we cannot append to the logfile, first check whether it is the default
- # logfile or not. If it is not, then add a log entry to state the error in
- --- 109,115 ----
- localtime(time);
- $date = sprintf("%.2d/%.2d/%.2d %.2d:%.2d:%.2d",
- $year,++$mon,$mday,$hour,$min,$sec);
- ! $log = $date . " $'prog_name\[$'jobnum\]: $msg\n";
-
- # If we cannot append to the logfile, first check whether it is the default
- # logfile or not. If it is not, then add a log entry to state the error in
-
- Index: bin/perload
- Prereq: 3.0
- *** bin/perload.old Thu Sep 22 16:43:30 1994
- --- bin/perload Thu Sep 22 16:43:30 1994
- ***************
- *** 8,14 ****
- # This perl script is its own manual page [generated by wrapman]
- #
-
- ! # $Id: perload,v 3.0 1993/11/29 13:50:28 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 8,14 ----
- # This perl script is its own manual page [generated by wrapman]
- #
-
- ! # $Id: perload,v 3.0.1.1 1994/09/22 14:41:41 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 19,24 ****
- --- 19,27 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: perload,v $
- + # Revision 3.0.1.1 1994/09/22 14:41:41 ram
- + # patch12: added minimal support for perl5 dataloading
- + #
- # Revision 3.0 1993/11/29 13:50:28 ram
- # Baseline for mailagent 3.0 netwide release.
- #
- ***************
- *** 162,167 ****
- --- 165,171 ----
- :sub main'autoload {
- : local($__file__) = shift(@_);
- : local($__packname__) = (caller(1))[3];
- + : $__packname__ =~ s/::/'/;
- : local($__rpackname__) = $__packname__;
- : local($__saved__) = $@;
- : $__rpackname__ =~ s/^auto_//;
- ***************
- *** 243,248 ****
- --- 247,253 ----
- :# called only once per routine to be loaded.
- :sub main'dataload {
- : local($__packname__) = (caller(1))[3];
- + : $__packname__ =~ s/::/'/;
- : local($__rpackname__) = $__packname__;
- : local($__at__) = $@;
- : $__rpackname__ =~ s/^auto_//;
-
- Index: agent/filter/msg.c
- Prereq: 3.0
- *** agent/filter/msg.c.old Thu Sep 22 16:42:52 1994
- --- agent/filter/msg.c Thu Sep 22 16:42:52 1994
- ***************
- *** 11,17 ****
- */
-
- /*
- ! * $Id: msg.c,v 3.0 1993/11/29 13:48:17 ram Exp $
- *
- * Copyright (c) 1990-1993, Raphael Manfredi
- *
- --- 11,17 ----
- */
-
- /*
- ! * $Id: msg.c,v 3.0.1.1 1994/09/22 13:46:01 ram Exp $
- *
- * Copyright (c) 1990-1993, Raphael Manfredi
- *
- ***************
- *** 22,27 ****
- --- 22,30 ----
- * of the source tree for mailagent 3.0.
- *
- * $Log: msg.c,v $
- + * Revision 3.0.1.1 1994/09/22 13:46:01 ram
- + * patch12: made fatal() arguments long rather than int for 64-bit machines
- + *
- * Revision 3.0 1993/11/29 13:48:17 ram
- * Baseline for mailagent 3.0 netwide release.
- *
- ***************
- *** 42,48 ****
- /* VARARGS2 */
- public void fatal(reason, arg1, arg2, arg3, arg4, arg5)
- char *reason;
- ! int arg1, arg2, arg3, arg4, arg5;
- {
- /* Fatal error -- die with a meaningful error status for sendmail. If the
- * logfile has been opened, the reason will also be logged there.
- --- 45,51 ----
- /* VARARGS2 */
- public void fatal(reason, arg1, arg2, arg3, arg4, arg5)
- char *reason;
- ! long arg1, arg2, arg3, arg4, arg5; /* Use longs, hope (char *) fits in it! */
- {
- /* Fatal error -- die with a meaningful error status for sendmail. If the
- * logfile has been opened, the reason will also be logged there.
-
- Index: agent/pl/makedir.pl
- Prereq: 3.0.1.1
- *** agent/pl/makedir.pl.old Thu Sep 22 16:43:16 1994
- --- agent/pl/makedir.pl Thu Sep 22 16:43:16 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: makedir.pl,v 3.0.1.1 1994/07/01 15:02:07 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: makedir.pl,v 3.0.1.2 1994/09/22 14:26:47 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: makedir.pl,v $
- + ;# Revision 3.0.1.2 1994/09/22 14:26:47 ram
- + ;# patch12: fixed regexp for perl5 support
- + ;#
- ;# Revision 3.0.1.1 1994/07/01 15:02:07 ram
- ;# patch8: default mode is now 0777, relies on umask for proper setting
- ;#
- ***************
- *** 27,33 ****
- $dir =~ s|/$||; # no trailing / or we'll try to make dir twice
- if (!-d $dir && $dir ne '') {
- # Make parent dir first
- ! &makedir($parent, $mode) if ($parent = $dir) =~ s|(.*)/.*|\1|;
- if (mkdir($dir, $mode)) {
- &add_log("creating directory $dir") if $loglvl > 19;
- } else {
- --- 30,36 ----
- $dir =~ s|/$||; # no trailing / or we'll try to make dir twice
- if (!-d $dir && $dir ne '') {
- # Make parent dir first
- ! &makedir($parent, $mode) if ($parent = $dir) =~ s|(.*)/.*|$1|;
- if (mkdir($dir, $mode)) {
- &add_log("creating directory $dir") if $loglvl > 19;
- } else {
-
- Index: agent/pl/getdate.pl
- Prereq: 3.0
- *** agent/pl/getdate.pl.old Thu Sep 22 16:43:12 1994
- --- agent/pl/getdate.pl Thu Sep 22 16:43:12 1994
- ***************
- *** 47,53 ****
- ;# Below are logging information for this package as included in the
- ;# mailagent program.
- ;#
- ! ;# $Id: getdate.pl,v 3.0 1993/11/29 13:48:48 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 47,53 ----
- ;# Below are logging information for this package as included in the
- ;# mailagent program.
- ;#
- ! ;# $Id: getdate.pl,v 3.0.1.1 1994/09/22 14:21:31 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 58,63 ****
- --- 58,66 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: getdate.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:21:31 ram
- + ;# patch12: local() statement was missing in &getdate parameters fetch
- + ;#
- ;# Revision 3.0 1993/11/29 13:48:48 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 911,918 ****
- }
-
- sub main'getdate {
- ! ($dtstr, $now, $timezone) = @_;
- ! local($now, $timezone);
- local(@lt);
- local($sdate);
- local($TZ);
- --- 914,920 ----
- }
-
- sub main'getdate {
- ! local($dtstr, $now, $timezone) = @_;
- local(@lt);
- local($sdate);
- local($TZ);
-
- Index: agent/pl/file_edit.pl
- Prereq: 3.0
- *** agent/pl/file_edit.pl.old Thu Sep 22 16:43:10 1994
- --- agent/pl/file_edit.pl Thu Sep 22 16:43:10 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: file_edit.pl,v 3.0 1993/11/29 13:48:46 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: file_edit.pl,v 3.0.1.1 1994/09/22 14:19:09 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: file_edit.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:19:09 ram
- + ;# patch12: typo prevented correct indexing in the @insert array
- + ;#
- ;# Revision 3.0 1993/11/29 13:48:46 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 190,196 ****
- $found++;
- } elsif ($type == $PATTERN) {
- study unless $studied++; # Optimize pattern matching
- ! ($found++, @insert[$i] = 0) if /$val/;
- } elsif ($type == $SUB && &$val($_, $.)) {
- $found++;
- }
- --- 193,199 ----
- $found++;
- } elsif ($type == $PATTERN) {
- study unless $studied++; # Optimize pattern matching
- ! ($found++, $insert[$i] = 0) if /$val/;
- } elsif ($type == $SUB && &$val($_, $.)) {
- $found++;
- }
-
- Index: agent/pl/mh.pl
- Prereq: 3.0.1.1
- *** agent/pl/mh.pl.old Thu Sep 22 16:43:16 1994
- --- agent/pl/mh.pl Thu Sep 22 16:43:16 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: mh.pl,v 3.0.1.1 1993/12/15 09:04:12 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: mh.pl,v 3.0.1.2 1994/09/22 14:27:16 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.2 1994/09/22 14:27:16 ram
- + ;# patch12: now updates folder_saved variable with file pathname
- + ;#
- ;# Revision 3.0.1.1 1993/12/15 09:04:12 ram
- ;# patch3: log mesages were not emitted correctly
- ;#
- ***************
- *** 90,96 ****
- if $mh eq 'MH' && $Profile{'Unseen-Sequence'} ne '' && !$failed;
-
- &'add_log("UNSEEN $name") if $'loglvl > 6; # Mark clearly in log
- ! return $failed; # Return failure status
- }
-
- #
- --- 93,100 ----
- if $mh eq 'MH' && $Profile{'Unseen-Sequence'} ne '' && !$failed;
-
- &'add_log("UNSEEN $name") if $'loglvl > 6; # Mark clearly in log
- ! $'folder_saved = $name; # Keep track of last folder we save into
- ! return $failed; # Return failure status
- }
-
- #
-
- Index: agent/test/actions
- Prereq: 3.0.1.5
- *** agent/test/actions.old Thu Sep 22 16:43:26 1994
- --- agent/test/actions Thu Sep 22 16:43:27 1994
- ***************
- *** 2,8 ****
- # Mailagent rules for action regression tests
- #
-
- ! # $Id: actions,v 3.0.1.5 1994/07/01 15:06:56 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 2,8 ----
- # Mailagent rules for action regression tests
- #
-
- ! # $Id: actions,v 3.0.1.6 1994/09/22 14:40:32 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.6 1994/09/22 14:40:32 ram
- + # patch12: added regression tests for DO
- + #
- # Revision 3.0.1.5 1994/07/01 15:06:56 ram
- # patch8: added exit status test for PERL command
- # patch8: added new test for vacation message with tome config variable
- ***************
- *** 97,102 ****
- --- 100,114 ----
- X-Tag: /bounce 2/ { BOUNCE "list" };
-
- X-Tag: /delete/ { DELETE };
- +
- + X-Tag: /do\b/
- + {
- + REQUIRE perl.1 __test__;
- + DO __test__'perl_1('always');
- + DO perl.2:__test__'perl_2("DO");
- + SAVE never;
- + };
- + <DO> { SAVE always.2; DO __foo__'perl_3; SAVE never; };
-
- X-Tag: /feed/
- {
-
- Index: agent/pl/signals.pl
- *** agent/pl/signals.pl.old Thu Sep 22 16:43:24 1994
- --- agent/pl/signals.pl Thu Sep 22 16:43:24 1994
- ***************
- *** 0 ****
- --- 1,33 ----
- + ;# $Id: signals.pl,v 3.0.1.1 1994/09/22 14:39:13 ram Exp $
- + ;#
- + ;# Copyright (c) 1990-1993, Raphael Manfredi
- + ;#
- + ;# You may redistribute only under the terms of the Artistic License,
- + ;# as specified in the README file that comes with the distribution.
- + ;# You may reuse parts of this distribution only within the terms of
- + ;# that same Artistic License; a copy of which may be found at the root
- + ;# of the source tree for mailagent 3.0.
- + ;#
- + ;# $Log: signals.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:39:13 ram
- + ;# patch12: created
- + ;#
- + ;#
- + # Catch all common signals
- + sub catch_signals {
- + unless (defined &emergency) {
- + &add_log("WARNING no emergency routine to trap signals") if $loglvl > 4;
- + return;
- + }
- + $SIG{'HUP'} = 'emergency';
- + $SIG{'INT'} = 'emergency';
- + $SIG{'QUIT'} = 'emergency';
- + $SIG{'PIPE'} = 'emergency';
- + $SIG{'IO'} = 'emergency';
- + $SIG{'BUS'} = 'emergency';
- + $SIG{'ILL'} = 'emergency';
- + $SIG{'SEGV'} = 'emergency';
- + $SIG{'ALRM'} = 'emergency';
- + $SIG{'TERM'} = 'emergency';
- + }
- +
-
- Index: agent/filter/lock.c
- Prereq: 3.0.1.1
- *** agent/filter/lock.c.old Thu Sep 22 16:42:51 1994
- --- agent/filter/lock.c Thu Sep 22 16:42:51 1994
- ***************
- *** 11,17 ****
- */
-
- /*
- ! * $Id: lock.c,v 3.0.1.1 1994/07/01 14:52:28 ram Exp $
- *
- * Copyright (c) 1990-1993, Raphael Manfredi
- *
- --- 11,17 ----
- */
-
- /*
- ! * $Id: lock.c,v 3.0.1.2 1994/09/22 13:44:52 ram Exp $
- *
- * Copyright (c) 1990-1993, Raphael Manfredi
- *
- ***************
- *** 22,27 ****
- --- 22,30 ----
- * of the source tree for mailagent 3.0.
- *
- * $Log: lock.c,v $
- + * Revision 3.0.1.2 1994/09/22 13:44:52 ram
- + * patch12: typo fix to enable correct lockfile timeout printing
- + *
- * Revision 3.0.1.1 1994/07/01 14:52:28 ram
- * patch8: now honours the lockhold config variable if present
- *
- ***************
- *** 131,136 ****
- } else
- add_log(6, "UNLOCKED filter (lock older than %d seconds)", hold);
- } else
- ! add_log(16, "lockfile for filter is recent (%d seconds or less), hold");
- }
-
- --- 134,139 ----
- } else
- add_log(6, "UNLOCKED filter (lock older than %d seconds)", hold);
- } else
- ! add_log(16, "lockfile for filter is recent (%d seconds or less)", hold);
- }
-
-
- Index: agent/pl/read_conf.pl
- Prereq: 3.0.1.2
- *** agent/pl/read_conf.pl.old Thu Sep 22 16:43:21 1994
- --- agent/pl/read_conf.pl Thu Sep 22 16:43:21 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: read_conf.pl,v 3.0.1.2 1994/07/01 15:04:50 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: read_conf.pl,v 3.0.1.3 1994/09/22 14:34:51 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: read_conf.pl,v $
- + ;# Revision 3.0.1.3 1994/09/22 14:34:51 ram
- + ;# patch12: do not attempt parsing of config if variable is undefined
- + ;#
- ;# Revision 3.0.1.2 1994/07/01 15:04:50 ram
- ;# patch8: set proper default values for new optional config variables
- ;#
- ***************
- *** 62,67 ****
- --- 65,71 ----
- # Parse config file held in variable and return 1 if ok, 0 for errors
- sub parse {
- local($config) = @_;
- + return 1 unless defined $config;
- local($eval) = ' ' x 1000; # Pre-extend
- local($myhome) = $ENV{'HOME'}; # must be correctly set by filter
- local($var, $value);
-
- Index: agent/pl/mailhook.pl
- Prereq: 3.0
- *** agent/pl/mailhook.pl.old Thu Sep 22 16:43:15 1994
- --- agent/pl/mailhook.pl Thu Sep 22 16:43:15 1994
- ***************
- *** 1,4 ****
- ! ;# $Id: mailhook.pl,v 3.0 1993/11/29 13:48:58 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- --- 1,4 ----
- ! ;# $Id: mailhook.pl,v 3.0.1.1 1994/09/22 14:26:22 ram Exp $
- ;#
- ;# Copyright (c) 1990-1993, Raphael Manfredi
- ;#
- ***************
- *** 9,14 ****
- --- 9,17 ----
- ;# of the source tree for mailagent 3.0.
- ;#
- ;# $Log: mailhook.pl,v $
- + ;# Revision 3.0.1.1 1994/09/22 14:26:22 ram
- + ;# patch12: propagates folder_saved as msgpath in PERL escapes
- + ;#
- ;# Revision 3.0 1993/11/29 13:48:58 ram
- ;# Baseline for mailagent 3.0 netwide release.
- ;#
- ***************
- *** 28,33 ****
- --- 31,37 ----
- local($package) = @_; # Package into which variables should be set
- local($init) = &'q(<<'EOP');
- : *header = *main'Header; # User may fetch headers via %header
- + : $msgpath = $main'folder_saved;
- : $sender = $header{'Sender'};
- : $subject = $header{'Subject'};
- : $precedence = $header{'Precedence'};
-
- Index: agent/test/basic/config.t
- Prereq: 3.0.1.1
- *** agent/test/basic/config.t.old Thu Sep 22 16:43:28 1994
- --- agent/test/basic/config.t Thu Sep 22 16:43:28 1994
- ***************
- *** 1,6 ****
- # This MUST be the first test ever run
-
- ! # $Id: config.t,v 3.0.1.1 1994/04/25 15:24:33 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- --- 1,6 ----
- # This MUST be the first test ever run
-
- ! # $Id: config.t,v 3.0.1.2 1994/09/22 14:40:52 ram Exp $
- #
- # Copyright (c) 1990-1993, Raphael Manfredi
- #
- ***************
- *** 11,16 ****
- --- 11,19 ----
- # of the source tree for mailagent 3.0.
- #
- # $Log: config.t,v $
- + # Revision 3.0.1.2 1994/09/22 14:40:52 ram
- + # patch12: added callout queue file definition
- + #
- # Revision 3.0.1.1 1994/04/25 15:24:33 ram
- # patch7: added commented 'fromesc' new variable
- #
- ***************
- *** 44,49 ****
- --- 47,53 ----
- queue : ~/queue # This is a good test for comments
- logdir : ~
- context : \$spool/context
- + callout : \$spool/callout
- log : agentlog
- seq : .seq
- timezone : PST8PDT
-
- Index: agent/test/README
- *** agent/test/README.old Thu Sep 22 16:43:25 1994
- --- agent/test/README Thu Sep 22 16:43:25 1994
- ***************
- *** 30,35 ****
- --- 30,39 ----
- with eval() which cause the dataloaded version to dump core via a segmentation
- violation).
-
- + The -m option is for desperate cases. It launches the atail process in the
- + background (a real CPU hog) to monitor all changes to the out/agentlog file.
- + This may be really convenient when debugging a test suite failure...
- +
- I don't know why I spent some time documenting all this, as I don't expect
- anybody to have any chance working on this suite. Anyway, it might be nice
- knowing that all the successful tests are recorded in an OK file, along
-
- *** End of Patch 16 ***
-
- exit 0 # Just in case...
-