home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Subject: REPOST: v38i031: procmail - mail processing package v2.90, Patch01
- Message-ID: <1993Jul9.222448.18548@sparky.imd.sterling.com>
- X-Md4-Signature: 2b94ef20afca82ae9c9436d24763b745
- Sender: kent@sparky.imd.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Fri, 9 Jul 1993 22:24:48 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
- Posting-number: Volume 38, Issue 31
- Archive-name: procmail/patch01
- Environment: sendmail, smail, MMDF, mailsurr, UNIX, POSIX
- Patch-To: procmail: Volume 38, Issue 19-30
-
-
- What this patch fixes/changes since v2.90:
- 1993/07/02: v2.91
- Fixed a race condition in autoconf that caused problems on machines
- that didn't have memmove(3) and were too fast (make got confused
- about the modification time of an object file)
- Corrected the SHELL=/bin/shell assignment in mailinglist/install.sh
- Fixed a typo in the regex library (introduced in v2.82pre4),
- caused some valid matches not to be found if the regular
- expression starts with an epsilon transition
- Fixed a few typos in the man pages
- Made sure the logfile was flushed before procmail exits
- Forgot to redirect output of a test in autoconf to /dev/null
- Stripping off leading "From " lines now before passing mails
- through the mailinglist
-
- To apply: cd procmail;make realclean;patch -p1 <this_file
-
- The "make realclean" can be omitted if you haven't typed "make" yet (i.e.
- if the sources come fresh out of the archive).
- --------------cut here---------
- diff -rc old/FEATURES procmail/FEATURES
- *** old/FEATURES Thu Feb 11 13:07:50 1993
- --- procmail/FEATURES Fri Jul 2 15:23:01 1993
- ***************
- *** 46,51 ****
- --- 46,53 ----
- names start with a 'U' or end in an 'X' :-) (i.e. extremely portable
- code; POSIX, ANSI C and K&R conforming)
- + Is clock skew immune (e.g. in the case of NFS mounted mailboxes)
- + + Can be used as a general mailfilter for whole groups of messages
- + (e.g. when called from within sendmail.cf rules).
- + Works with (among others?) sendmail, smail, MMDF and mailsurr
-
- Feature summary for formail:
- diff -rc old/HISTORY procmail/HISTORY
- *** old/HISTORY Thu Jul 1 13:58:17 1993
- --- procmail/HISTORY Fri Jul 2 18:37:36 1993
- ***************
- *** 212,217 ****
- Fixed a race condition when the recipient mailbox did not exist
- and two procmails simultaneously tried to create it
- Cleaned up main() in procmail.c (localised variables)
- - Made sure the logfile was flushed before procmail exits
- When procmail gobbles up the leading From_ line, it reads in 2KB
- blocks now (instead of character wise; saves a few system calls)
- --- 212,231 ----
- Fixed a race condition when the recipient mailbox did not exist
- and two procmails simultaneously tried to create it
- Cleaned up main() in procmail.c (localised variables)
- When procmail gobbles up the leading From_ line, it reads in 2KB
- blocks now (instead of character wise; saves a few system calls)
- + 1993/07/02: v2.91
- + Fixed a race condition in autoconf that caused problems on machines
- + that didn't have memmove(3) and were too fast (make got confused
- + about the modification time of an object file)
- + Corrected the SHELL=/bin/shell assignment in mailinglist/install.sh
- + Made the mailinglist/install.sh script independent of procmail
- + compiled with or without "#define console"
- + Fixed a typo in the regex library (introduced in v2.82pre4),
- + caused some valid matches not to be found if the regular
- + expression starts with an epsilon transition
- + Fixed a few typos in the man pages
- + Made sure the logfile was flushed before procmail exits
- + Forgot to redirect output of a test in autoconf to /dev/null
- + Stripping off leading "From " lines now before passing mails
- + through the mailinglist
- diff -rc old/Makefile procmail/Makefile
- *** old/Makefile Fri Jun 25 15:38:38 1993
- --- procmail/Makefile Fri Jul 2 18:31:37 1993
- ***************
- *** 1,4 ****
- ! #$Id: Makefile,v 1.32 1993/06/25 13:38:38 berg Exp $
-
- # change BASENAME to your home directory if need be
- BASENAME = /usr/local
- --- 1,4 ----
- ! #$Id: Makefile,v 1.33 1993/07/02 16:31:37 berg Exp $
-
- # change BASENAME to your home directory if need be
- BASENAME = /usr/local
- ***************
- *** 42,48 ****
- # Makefile.0 - mark, don't (re)move this, a sed script needs it
-
- #LOCKINGTEST=/tmp . # Uncomment and add any directories you see fit.
- ! # If LOCKINGTEST is undefined, autoconf will not
- # prompt you to enter additional directories.
- # See INSTALL for more information about the
- # significance of the locking tests.
- --- 42,48 ----
- # Makefile.0 - mark, don't (re)move this, a sed script needs it
-
- #LOCKINGTEST=/tmp . # Uncomment and add any directories you see fit.
- ! # If LOCKINGTEST is undefined, autoconf will NOT
- # prompt you to enter additional directories.
- # See INSTALL for more information about the
- # significance of the locking tests.
- diff -rc old/README procmail/README
- *** old/README Thu Jul 1 13:58:20 1993
- --- procmail/README Fri Jul 2 18:43:39 1993
- ***************
- *** 35,41 ****
-
- ------------------------------ DESCRIPTION -----------------------------------
-
- ! The procmail mail processing program. (v2.90 1993/07/01)
-
- Can be used to create mail-servers, mailing lists, sort your incoming mail
- into separate folders/files (real convenient when subscribing to one or more
- --- 35,41 ----
-
- ------------------------------ DESCRIPTION -----------------------------------
-
- ! The procmail mail processing program. (v2.91 1993/07/02)
-
- Can be used to create mail-servers, mailing lists, sort your incoming mail
- into separate folders/files (real convenient when subscribing to one or more
- ***************
- *** 44,49 ****
- --- 44,56 ----
- workstation for different types of mail) or selectively forward certain
- incoming mail automatically to someone.
-
- + Procmail can be used:
- + - and installed by an unprivileged user (for himself only).
- + - as a drop in replacement for the local delivery agent /bin/mail
- + (with biff/comsat support).
- + - as a general mailfilter for whole groups of messages (e.g. when
- + called from within sendmail.cf rules).
- +
- The accompanying formail program enables you to generate autoreplies, split up
- digests/mailboxes into the original messages, do some very simple
- header-munging/extraction, or force mail into mail-format (with leading From
- ***************
- *** 55,60 ****
- --- 62,71 ----
-
- I made the utmost effort to make procmail as robust as any program can be
- (every conceivable system error is caught *and* handled).
- +
- + Since procmail is written entirely in C, it poses a very low impact
- + on your system's resources (under normal conditions, when you don't
- + start other programs/scripts from within it).
-
- Procmail was designed to deliver the mail under the worst conditions
- (file system full, out of swap space, process table full, file table full,
- diff -rc old/mailinglist/etc/rc.submit procmail/mailinglist/etc/rc.submit
- *** old/mailinglist/etc/rc.submit Tue Jun 29 17:36:16 1993
- --- procmail/mailinglist/etc/rc.submit Fri Jul 2 15:23:23 1993
- ***************
- *** 5,11 ****
- # New mails can be temporarily stalled by creating the file rc.lock (either in
- # ../.etc for all lists or in the current directory for this list only).
-
- ! #$Id: rc.submit,v 1.22 1993/06/29 15:36:16 berg Exp $
-
- INCLUDERC=$RC_INIT
- INCLUDERC=$RC_CUSTOM
- --- 5,11 ----
- # New mails can be temporarily stalled by creating the file rc.lock (either in
- # ../.etc for all lists or in the current directory for this list only).
-
- ! #$Id: rc.submit,v 1.23 1993/07/02 13:23:23 berg Exp $
-
- INCLUDERC=$RC_INIT
- INCLUDERC=$RC_CUSTOM
- ***************
- *** 65,71 ****
- #
-
- :0 A wfh
- ! | formail -b -IReceived: -IReturn-Receipt-To: -IErrors-To: \
- -iReturn-Path: -iX-Envelope-To: -iX-Envelope-From: \
- -I"Precedence: list" -I"Resent-Sender: $listreq" \
- -a"Resent-From: $listaddr" -A"X-Loop: $listaddr" \
- --- 65,71 ----
- #
-
- :0 A wfh
- ! | formail -b -IFrom\ -IReceived: -IReturn-Receipt-To: -IErrors-To: \
- -iReturn-Path: -iX-Envelope-To: -iX-Envelope-From: \
- -I"Precedence: list" -I"Resent-Sender: $listreq" \
- -a"Resent-From: $listaddr" -A"X-Loop: $listaddr" \
- diff -rc old/mailinglist/install.sh procmail/mailinglist/install.sh
- *** old/mailinglist/install.sh Mon Jun 28 19:02:37 1993
- --- procmail/mailinglist/install.sh Fri Jul 2 18:31:40 1993
- ***************
- *** 1,8 ****
- #! /bin/sh
- : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- ! #$Id: install.sh,v 1.23 1993/06/28 17:02:37 berg Exp $
-
- ! SHELL=/bin/shell
- export SHELL
-
- test $# != 1 -a $# != 2 && echo "Usage: install.sh target-directory [.bin]" &&
- --- 1,8 ----
- #! /bin/sh
- : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
- ! #$Id: install.sh,v 1.25 1993/07/02 16:31:40 berg Exp $
-
- ! SHELL=/bin/sh
- export SHELL
-
- test $# != 1 -a $# != 2 && echo "Usage: install.sh target-directory [.bin]" &&
- ***************
- *** 16,25 ****
- test ! -d "$target" && echo "Please create the target directory first" &&
- exit 2
-
- ! if binmail=`procmail /dev/null DEFAULT=/dev/null LOG=\\\$SENDMAIL \
- ! </dev/null 2>&1`
- then
- ! :
- else
- echo "Please make sure that procmail is on our PATH"
- exit 64
- --- 16,27 ----
- test ! -d "$target" && echo "Please create the target directory first" &&
- exit 2
-
- ! if binmail="`procmail /dev/null DEFAULT=/dev/null LOG=\\\$SENDMAIL \
- ! </dev/null 2>&1`"
- then
- ! test -z "$binmail" &&
- ! echo "Please make sure that the new version of procmail has been installed"\
- ! && exit 64
- else
- echo "Please make sure that procmail is on our PATH"
- exit 64
- diff -rc old/man/procmailrc.man procmail/man/procmailrc.man
- *** old/man/procmailrc.man Mon Jun 21 16:24:10 1993
- --- procmail/man/procmailrc.man Fri Jul 2 15:23:28 1993
- ***************
- *** 1,4 ****
- ! .Id $Id: procmailrc.man,v 1.23 1993/06/21 14:24:10 berg Exp $
- .TH PROCMAILRC 5 \*(Dt BuGless
- .na
- .SH NAME
- --- 1,4 ----
- ! .Id $Id: procmailrc.man,v 1.24 1993/07/02 13:23:28 berg Exp $
- .TH PROCMAILRC 5 \*(Dt BuGless
- .na
- .SH NAME
- ***************
- *** 494,502 ****
- The only substitutions of environment variables that can be handled by
- procmail itself are of the type $name, ${name}, $#, $n, $$, $? and $\-;
- whereas $\- will be substituted by $LASTFOLDER. When the
- ! .B \-$ARGUMENTOPT@
- or
- ! .B \-$MAILFILTOPT@
- options are used, "$@" will expand to respectively the specified argument
- or the sender and recipient list; but only when passed as in the
- argument list to a program.@UPPERCASE_USERNAMES@
- --- 494,502 ----
- The only substitutions of environment variables that can be handled by
- procmail itself are of the type $name, ${name}, $#, $n, $$, $? and $\-;
- whereas $\- will be substituted by $LASTFOLDER. When the
- ! .B \-@ARGUMENTOPT@
- or
- ! .B \-@MAILFILTOPT@
- options are used, "$@" will expand to respectively the specified argument
- or the sender and recipient list; but only when passed as in the
- argument list to a program.@UPPERCASE_USERNAMES@
- diff -rc old/patchlevel.h procmail/patchlevel.h
- *** old/patchlevel.h Thu Jul 1 13:58:25 1993
- --- procmail/patchlevel.h Fri Jul 2 15:23:12 1993
- ***************
- *** 1,5 ****
- #define VERSION "\
- ! procmail v2.90 1993/07/01 written and created by Stephen R. van den Berg\n\
- \t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
- \t\t\t\tberg@physik.tu-muenchen.de\n\
- \n\
- --- 1,5 ----
- #define VERSION "\
- ! procmail v2.91 1993/07/02 written and created by Stephen R. van den Berg\n\
- \t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
- \t\t\t\tberg@physik.tu-muenchen.de\n\
- \n\
- diff -rc old/src/autoconf procmail/src/autoconf
- *** old/src/autoconf Wed Jun 23 16:35:13 1993
- --- procmail/src/autoconf Fri Jul 2 18:31:45 1993
- ***************
- *** 1,6 ****
- #! /bin/sh
- :
- ! #$Id: autoconf,v 1.56 1993/06/23 14:35:13 berg Exp $
-
- # All possible entries in autoconf.h:
-
- --- 1,6 ----
- #! /bin/sh
- :
- ! #$Id: autoconf,v 1.58 1993/07/02 16:31:45 berg Exp $
-
- # All possible entries in autoconf.h:
-
- ***************
- *** 203,209 ****
- :
- else
- echo "#define setsid()" >>_locktst.h
- ! $MAKE _autotst.$O 2>&1 >$DEVNULL
- test -f _autotst.$O || echo "#define UNISTD_H_MISSING" >>$ACONF
- fi
- fi
- --- 203,209 ----
- :
- else
- echo "#define setsid()" >>_locktst.h
- ! $MAKE _autotst.$O >$DEVNULL 2>&1
- test -f _autotst.$O || echo "#define UNISTD_H_MISSING" >>$ACONF
- fi
- fi
- ***************
- *** 838,844 ****
- echo 'Sorry, incompetent bcopy'
- echo '#define NObcopy' >>$ACONF
- fi
- ! $RM _autotst
- fi
-
- $FGREP -e LD_ /bin/ld >/dev/null 2>&1 && echo "#define LD_ENV_FIX" >>$ACONF
- --- 838,844 ----
- echo 'Sorry, incompetent bcopy'
- echo '#define NObcopy' >>$ACONF
- fi
- ! $RM _autotst.$O _autotst
- fi
-
- $FGREP -e LD_ /bin/ld >/dev/null 2>&1 && echo "#define LD_ENV_FIX" >>$ACONF
- diff -rc old/src/misc.c procmail/src/misc.c
- *** old/src/misc.c Mon Jun 21 16:24:41 1993
- --- procmail/src/misc.c Fri Jul 2 18:31:48 1993
- ***************
- *** 6,12 ****
- ************************************************************************/
- #ifdef RCS
- static /*const*/char rcsid[]=
- ! "$Id: misc.c,v 1.26 1993/06/21 14:24:41 berg Exp $";
- #endif
- #include "procmail.h"
- #include "sublib.h"
- --- 6,12 ----
- ************************************************************************/
- #ifdef RCS
- static /*const*/char rcsid[]=
- ! "$Id: misc.c,v 1.27 1993/07/02 16:31:48 berg Exp $";
- #endif
- #include "procmail.h"
- #include "sublib.h"
- ***************
- *** 155,162 ****
- if(!(lcking&lck_ALLOCLIB)) /* don't reenter malloc/free */
- exectrap(tgetenv("TRAP"));
- nextexit=2;unlock(&loclock);unlock(&globlock);fdunlock();
- ! }
- ! exit(fakedelivery==2?EX_OK:retval);
- }
-
- void suspend P((void))
- --- 155,162 ----
- if(!(lcking&lck_ALLOCLIB)) /* don't reenter malloc/free */
- exectrap(tgetenv("TRAP"));
- nextexit=2;unlock(&loclock);unlock(&globlock);fdunlock();
- ! } /* flush the logfile & exit procmail */
- ! elog("");exit(fakedelivery==2?EX_OK:retval);
- }
-
- void suspend P((void))
- diff -rc old/src/regexp.c procmail/src/regexp.c
- *** old/src/regexp.c Wed Jun 30 18:14:06 1993
- --- procmail/src/regexp.c Fri Jul 2 17:36:24 1993
- ***************
- *** 8,14 ****
- ************************************************************************/
- #ifdef RCS
- static /*const*/char rcsid[]=
- ! "$Id: regexp.c,v 1.27 1993/06/30 16:14:06 berg Exp $";
- #endif
- #include "procmail.h"
- #include "robust.h"
- --- 8,14 ----
- ************************************************************************/
- #ifdef RCS
- static /*const*/char rcsid[]=
- ! "$Id: regexp.c,v 1.28 1993/07/02 15:36:24 berg Exp $";
- #endif
- #include "procmail.h"
- #include "robust.h"
- ***************
- *** 376,382 ****
- static struct eps sempty={OPC_SEMPTY,&sempty};
- sempty.spawn=initstack= &sempty;
- if((initcode=code)->opc==OPC_EPS)
- ! initcode=(initstack=code)->next,code->spawn= &sempty;
- thiss=Ceps&tswitch;th1=ioffsetof(struct chclass,pos1);
- ot1=ioffsetof(struct chclass,pos2);str=text-1;len++;i='\n';goto setups;
- do /* make sure any beginning-of-line-hooks catch */
- --- 376,382 ----
- static struct eps sempty={OPC_SEMPTY,&sempty};
- sempty.spawn=initstack= &sempty;
- if((initcode=code)->opc==OPC_EPS)
- ! initcode=(initstack=code)+1,code->spawn= &sempty;
- thiss=Ceps&tswitch;th1=ioffsetof(struct chclass,pos1);
- ot1=ioffsetof(struct chclass,pos2);str=text-1;len++;i='\n';goto setups;
- do /* make sure any beginning-of-line-hooks catch */
- --------------cut here---------
-
- --
- Sincerely, berg@pool.informatik.rwth-aachen.de
- Stephen R. van den Berg (AKA BuGless). berg@physik.tu-muenchen.de
-
- "I have a *cunning* plan!"
-
- exit 0 # Just in case...
-