home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / procmail / patch01 < prev    next >
Encoding:
Text File  |  1993-07-09  |  15.8 KB  |  436 lines

  1. Newsgroups: comp.sources.misc
  2. From: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  3. Subject: REPOST: v38i031:  procmail - mail processing package v2.90, Patch01
  4. Message-ID: <1993Jul9.222448.18548@sparky.imd.sterling.com>
  5. X-Md4-Signature: 2b94ef20afca82ae9c9436d24763b745
  6. Sender: kent@sparky.imd.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Fri, 9 Jul 1993 22:24:48 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: berg@pool.informatik.rwth-aachen.de (Stephen R. van den Berg)
  12. Posting-number: Volume 38, Issue 31
  13. Archive-name: procmail/patch01
  14. Environment: sendmail, smail, MMDF, mailsurr, UNIX, POSIX
  15. Patch-To: procmail: Volume 38, Issue 19-30
  16.  
  17.  
  18. What this patch fixes/changes since v2.90:
  19. 1993/07/02: v2.91
  20.         Fixed a race condition in autoconf that caused problems on machines
  21.            that didn't have memmove(3) and were too fast (make got confused
  22.            about the modification time of an object file)
  23.         Corrected the SHELL=/bin/shell assignment in mailinglist/install.sh
  24.         Fixed a typo in the regex library (introduced in v2.82pre4),
  25.            caused some valid matches not to be found if the regular
  26.            expression starts with an epsilon transition
  27.         Fixed a few typos in the man pages
  28.         Made sure the logfile was flushed before procmail exits
  29.         Forgot to redirect output of a test in autoconf to /dev/null
  30.         Stripping off leading "From " lines now before passing mails
  31.            through the mailinglist
  32.  
  33. To apply:    cd procmail;make realclean;patch -p1 <this_file
  34.  
  35. The "make realclean" can be omitted if you haven't typed "make" yet (i.e.
  36. if the sources come fresh out of the archive).
  37. --------------cut here---------
  38. diff -rc old/FEATURES procmail/FEATURES
  39. *** old/FEATURES    Thu Feb 11 13:07:50 1993
  40. --- procmail/FEATURES    Fri Jul  2 15:23:01 1993
  41. ***************
  42. *** 46,51 ****
  43. --- 46,53 ----
  44.         names start with a 'U' or end in an 'X' :-) (i.e. extremely portable
  45.         code; POSIX, ANSI C and K&R conforming)
  46.       + Is clock skew immune (e.g. in the case of NFS mounted mailboxes)
  47. +     + Can be used as a general mailfilter for whole groups of messages
  48. +       (e.g. when called from within sendmail.cf rules).
  49.       + Works with (among others?) sendmail, smail, MMDF and mailsurr
  50.   
  51.   Feature summary for formail:
  52. diff -rc old/HISTORY procmail/HISTORY
  53. *** old/HISTORY    Thu Jul  1 13:58:17 1993
  54. --- procmail/HISTORY    Fri Jul  2 18:37:36 1993
  55. ***************
  56. *** 212,217 ****
  57.           Fixed a race condition when the recipient mailbox did not exist
  58.              and two procmails simultaneously tried to create it
  59.           Cleaned up main() in procmail.c (localised variables)
  60. -         Made sure the logfile was flushed before procmail exits
  61.           When procmail gobbles up the leading From_ line, it reads in 2KB
  62.              blocks now (instead of character wise; saves a few system calls)
  63. --- 212,231 ----
  64.           Fixed a race condition when the recipient mailbox did not exist
  65.              and two procmails simultaneously tried to create it
  66.           Cleaned up main() in procmail.c (localised variables)
  67.           When procmail gobbles up the leading From_ line, it reads in 2KB
  68.              blocks now (instead of character wise; saves a few system calls)
  69. + 1993/07/02: v2.91
  70. +         Fixed a race condition in autoconf that caused problems on machines
  71. +            that didn't have memmove(3) and were too fast (make got confused
  72. +            about the modification time of an object file)
  73. +         Corrected the SHELL=/bin/shell assignment in mailinglist/install.sh
  74. +         Made the mailinglist/install.sh script independent of procmail
  75. +            compiled with or without "#define console"
  76. +         Fixed a typo in the regex library (introduced in v2.82pre4),
  77. +            caused some valid matches not to be found if the regular
  78. +            expression starts with an epsilon transition
  79. +         Fixed a few typos in the man pages
  80. +         Made sure the logfile was flushed before procmail exits
  81. +         Forgot to redirect output of a test in autoconf to /dev/null
  82. +         Stripping off leading "From " lines now before passing mails
  83. +            through the mailinglist
  84. diff -rc old/Makefile procmail/Makefile
  85. *** old/Makefile    Fri Jun 25 15:38:38 1993
  86. --- procmail/Makefile    Fri Jul  2 18:31:37 1993
  87. ***************
  88. *** 1,4 ****
  89. ! #$Id: Makefile,v 1.32 1993/06/25 13:38:38 berg Exp $
  90.   
  91.   # change BASENAME to your home directory if need be
  92.   BASENAME = /usr/local
  93. --- 1,4 ----
  94. ! #$Id: Makefile,v 1.33 1993/07/02 16:31:37 berg Exp $
  95.   
  96.   # change BASENAME to your home directory if need be
  97.   BASENAME = /usr/local
  98. ***************
  99. *** 42,48 ****
  100.   # Makefile.0 - mark, don't (re)move this, a sed script needs it
  101.   
  102.   #LOCKINGTEST=/tmp .    # Uncomment and add any directories you see fit.
  103. ! #            If LOCKINGTEST is undefined, autoconf will not
  104.   #            prompt you to enter additional directories.
  105.   #            See INSTALL for more information about the
  106.   #            significance of the locking tests.
  107. --- 42,48 ----
  108.   # Makefile.0 - mark, don't (re)move this, a sed script needs it
  109.   
  110.   #LOCKINGTEST=/tmp .    # Uncomment and add any directories you see fit.
  111. ! #            If LOCKINGTEST is undefined, autoconf will NOT
  112.   #            prompt you to enter additional directories.
  113.   #            See INSTALL for more information about the
  114.   #            significance of the locking tests.
  115. diff -rc old/README procmail/README
  116. *** old/README    Thu Jul  1 13:58:20 1993
  117. --- procmail/README    Fri Jul  2 18:43:39 1993
  118. ***************
  119. *** 35,41 ****
  120.   
  121.   ------------------------------ DESCRIPTION -----------------------------------
  122.   
  123. ! The procmail mail processing program. (v2.90 1993/07/01)
  124.   
  125.   Can be used to create mail-servers, mailing lists, sort your incoming mail
  126.   into separate folders/files (real convenient when subscribing to one or more
  127. --- 35,41 ----
  128.   
  129.   ------------------------------ DESCRIPTION -----------------------------------
  130.   
  131. ! The procmail mail processing program. (v2.91 1993/07/02)
  132.   
  133.   Can be used to create mail-servers, mailing lists, sort your incoming mail
  134.   into separate folders/files (real convenient when subscribing to one or more
  135. ***************
  136. *** 44,49 ****
  137. --- 44,56 ----
  138.   workstation for different types of mail) or selectively forward certain
  139.   incoming mail automatically to someone.
  140.   
  141. + Procmail can be used:
  142. +     - and installed by an unprivileged user (for himself only).
  143. +     - as a drop in replacement for the local delivery agent /bin/mail
  144. +       (with biff/comsat support).
  145. +     - as a general mailfilter for whole groups of messages (e.g. when
  146. +       called from within sendmail.cf rules).
  147.   The accompanying formail program enables you to generate autoreplies, split up
  148.   digests/mailboxes into the original messages, do some very simple
  149.   header-munging/extraction, or force mail into mail-format (with leading From
  150. ***************
  151. *** 55,60 ****
  152. --- 62,71 ----
  153.   
  154.   I made the utmost effort to make procmail as robust as any program can be
  155.   (every conceivable system error is caught *and* handled).
  156. + Since procmail is written entirely in C, it poses a very low impact
  157. + on your system's resources (under normal conditions, when you don't
  158. + start other programs/scripts from within it).
  159.   
  160.   Procmail was designed to deliver the mail under the worst conditions
  161.   (file system full, out of swap space, process table full, file table full,
  162. diff -rc old/mailinglist/etc/rc.submit procmail/mailinglist/etc/rc.submit
  163. *** old/mailinglist/etc/rc.submit    Tue Jun 29 17:36:16 1993
  164. --- procmail/mailinglist/etc/rc.submit    Fri Jul  2 15:23:23 1993
  165. ***************
  166. *** 5,11 ****
  167.   # New mails can be temporarily stalled by creating the file rc.lock (either in
  168.   # ../.etc for all lists or in the current directory for this list only).
  169.   
  170. ! #$Id: rc.submit,v 1.22 1993/06/29 15:36:16 berg Exp $
  171.   
  172.   INCLUDERC=$RC_INIT
  173.   INCLUDERC=$RC_CUSTOM
  174. --- 5,11 ----
  175.   # New mails can be temporarily stalled by creating the file rc.lock (either in
  176.   # ../.etc for all lists or in the current directory for this list only).
  177.   
  178. ! #$Id: rc.submit,v 1.23 1993/07/02 13:23:23 berg Exp $
  179.   
  180.   INCLUDERC=$RC_INIT
  181.   INCLUDERC=$RC_CUSTOM
  182. ***************
  183. *** 65,71 ****
  184.   #
  185.   
  186.       :0 A wfh
  187. !     | formail -b -IReceived: -IReturn-Receipt-To: -IErrors-To: \
  188.          -iReturn-Path: -iX-Envelope-To: -iX-Envelope-From: \
  189.          -I"Precedence: list" -I"Resent-Sender: $listreq" \
  190.          -a"Resent-From: $listaddr" -A"X-Loop: $listaddr" \
  191. --- 65,71 ----
  192.   #
  193.   
  194.       :0 A wfh
  195. !     | formail -b -IFrom\  -IReceived: -IReturn-Receipt-To: -IErrors-To: \
  196.          -iReturn-Path: -iX-Envelope-To: -iX-Envelope-From: \
  197.          -I"Precedence: list" -I"Resent-Sender: $listreq" \
  198.          -a"Resent-From: $listaddr" -A"X-Loop: $listaddr" \
  199. diff -rc old/mailinglist/install.sh procmail/mailinglist/install.sh
  200. *** old/mailinglist/install.sh    Mon Jun 28 19:02:37 1993
  201. --- procmail/mailinglist/install.sh    Fri Jul  2 18:31:40 1993
  202. ***************
  203. *** 1,8 ****
  204.   #! /bin/sh
  205.   : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  206. ! #$Id: install.sh,v 1.23 1993/06/28 17:02:37 berg Exp $
  207.   
  208. ! SHELL=/bin/shell
  209.   export SHELL
  210.   
  211.   test $# != 1 -a $# != 2 && echo "Usage: install.sh target-directory [.bin]" &&
  212. --- 1,8 ----
  213.   #! /bin/sh
  214.   : &&O= || exec /bin/sh $0 $argv:q # we're in a csh, feed myself to sh
  215. ! #$Id: install.sh,v 1.25 1993/07/02 16:31:40 berg Exp $
  216.   
  217. ! SHELL=/bin/sh
  218.   export SHELL
  219.   
  220.   test $# != 1 -a $# != 2 && echo "Usage: install.sh target-directory [.bin]" &&
  221. ***************
  222. *** 16,25 ****
  223.   test ! -d "$target" && echo "Please create the target directory first" &&
  224.    exit 2
  225.   
  226. ! if binmail=`procmail /dev/null DEFAULT=/dev/null LOG=\\\$SENDMAIL \
  227. !   </dev/null 2>&1`
  228.   then
  229. ! :
  230.   else
  231.     echo "Please make sure that procmail is on our PATH"
  232.     exit 64
  233. --- 16,27 ----
  234.   test ! -d "$target" && echo "Please create the target directory first" &&
  235.    exit 2
  236.   
  237. ! if binmail="`procmail /dev/null DEFAULT=/dev/null LOG=\\\$SENDMAIL \
  238. !   </dev/null 2>&1`"
  239.   then
  240. !   test -z "$binmail" &&
  241. !    echo "Please make sure that the new version of procmail has been installed"\
  242. !    && exit 64
  243.   else
  244.     echo "Please make sure that procmail is on our PATH"
  245.     exit 64
  246. diff -rc old/man/procmailrc.man procmail/man/procmailrc.man
  247. *** old/man/procmailrc.man    Mon Jun 21 16:24:10 1993
  248. --- procmail/man/procmailrc.man    Fri Jul  2 15:23:28 1993
  249. ***************
  250. *** 1,4 ****
  251. ! .Id $Id: procmailrc.man,v 1.23 1993/06/21 14:24:10 berg Exp $
  252.   .TH PROCMAILRC 5 \*(Dt BuGless
  253.   .na
  254.   .SH NAME
  255. --- 1,4 ----
  256. ! .Id $Id: procmailrc.man,v 1.24 1993/07/02 13:23:28 berg Exp $
  257.   .TH PROCMAILRC 5 \*(Dt BuGless
  258.   .na
  259.   .SH NAME
  260. ***************
  261. *** 494,502 ****
  262.   The only substitutions of environment variables that can be handled by
  263.   procmail itself are of the type $name, ${name}, $#, $n, $$, $? and $\-;
  264.   whereas $\- will be substituted by $LASTFOLDER.  When the
  265. ! .B \-$ARGUMENTOPT@
  266.   or
  267. ! .B \-$MAILFILTOPT@
  268.   options are used, "$@" will expand to respectively the specified argument
  269.   or the sender and recipient list; but only when passed as in the
  270.   argument list to a program.@UPPERCASE_USERNAMES@
  271. --- 494,502 ----
  272.   The only substitutions of environment variables that can be handled by
  273.   procmail itself are of the type $name, ${name}, $#, $n, $$, $? and $\-;
  274.   whereas $\- will be substituted by $LASTFOLDER.  When the
  275. ! .B \-@ARGUMENTOPT@
  276.   or
  277. ! .B \-@MAILFILTOPT@
  278.   options are used, "$@" will expand to respectively the specified argument
  279.   or the sender and recipient list; but only when passed as in the
  280.   argument list to a program.@UPPERCASE_USERNAMES@
  281. diff -rc old/patchlevel.h procmail/patchlevel.h
  282. *** old/patchlevel.h    Thu Jul  1 13:58:25 1993
  283. --- procmail/patchlevel.h    Fri Jul  2 15:23:12 1993
  284. ***************
  285. *** 1,5 ****
  286.   #define VERSION "\
  287. ! procmail v2.90 1993/07/01 written and created by Stephen R. van den Berg\n\
  288.   \t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
  289.   \t\t\t\tberg@physik.tu-muenchen.de\n\
  290.   \n\
  291. --- 1,5 ----
  292.   #define VERSION "\
  293. ! procmail v2.91 1993/07/02 written and created by Stephen R. van den Berg\n\
  294.   \t\t\t\tberg@pool.informatik.rwth-aachen.de\n\
  295.   \t\t\t\tberg@physik.tu-muenchen.de\n\
  296.   \n\
  297. diff -rc old/src/autoconf procmail/src/autoconf
  298. *** old/src/autoconf    Wed Jun 23 16:35:13 1993
  299. --- procmail/src/autoconf    Fri Jul  2 18:31:45 1993
  300. ***************
  301. *** 1,6 ****
  302.   #! /bin/sh
  303.   :
  304. ! #$Id: autoconf,v 1.56 1993/06/23 14:35:13 berg Exp $
  305.   
  306.   # All possible entries in autoconf.h:
  307.   
  308. --- 1,6 ----
  309.   #! /bin/sh
  310.   :
  311. ! #$Id: autoconf,v 1.58 1993/07/02 16:31:45 berg Exp $
  312.   
  313.   # All possible entries in autoconf.h:
  314.   
  315. ***************
  316. *** 203,209 ****
  317.     :
  318.     else
  319.        echo "#define setsid()" >>_locktst.h
  320. !      $MAKE _autotst.$O 2>&1 >$DEVNULL
  321.        test -f _autotst.$O || echo "#define UNISTD_H_MISSING" >>$ACONF
  322.     fi
  323.   fi
  324. --- 203,209 ----
  325.     :
  326.     else
  327.        echo "#define setsid()" >>_locktst.h
  328. !      $MAKE _autotst.$O >$DEVNULL 2>&1
  329.        test -f _autotst.$O || echo "#define UNISTD_H_MISSING" >>$ACONF
  330.     fi
  331.   fi
  332. ***************
  333. *** 838,844 ****
  334.      echo 'Sorry, incompetent bcopy'
  335.      echo '#define NObcopy' >>$ACONF
  336.    fi
  337. !  $RM _autotst
  338.   fi
  339.   
  340.   $FGREP -e LD_ /bin/ld >/dev/null 2>&1 && echo "#define LD_ENV_FIX" >>$ACONF
  341. --- 838,844 ----
  342.      echo 'Sorry, incompetent bcopy'
  343.      echo '#define NObcopy' >>$ACONF
  344.    fi
  345. !  $RM _autotst.$O _autotst
  346.   fi
  347.   
  348.   $FGREP -e LD_ /bin/ld >/dev/null 2>&1 && echo "#define LD_ENV_FIX" >>$ACONF
  349. diff -rc old/src/misc.c procmail/src/misc.c
  350. *** old/src/misc.c    Mon Jun 21 16:24:41 1993
  351. --- procmail/src/misc.c    Fri Jul  2 18:31:48 1993
  352. ***************
  353. *** 6,12 ****
  354.    ************************************************************************/
  355.   #ifdef RCS
  356.   static /*const*/char rcsid[]=
  357. !  "$Id: misc.c,v 1.26 1993/06/21 14:24:41 berg Exp $";
  358.   #endif
  359.   #include "procmail.h"
  360.   #include "sublib.h"
  361. --- 6,12 ----
  362.    ************************************************************************/
  363.   #ifdef RCS
  364.   static /*const*/char rcsid[]=
  365. !  "$Id: misc.c,v 1.27 1993/07/02 16:31:48 berg Exp $";
  366.   #endif
  367.   #include "procmail.h"
  368.   #include "sublib.h"
  369. ***************
  370. *** 155,162 ****
  371.        if(!(lcking&lck_ALLOCLIB))            /* don't reenter malloc/free */
  372.       exectrap(tgetenv("TRAP"));
  373.        nextexit=2;unlock(&loclock);unlock(&globlock);fdunlock();
  374. !    }
  375. !   exit(fakedelivery==2?EX_OK:retval);
  376.   }
  377.   
  378.   void suspend P((void))
  379. --- 155,162 ----
  380.        if(!(lcking&lck_ALLOCLIB))            /* don't reenter malloc/free */
  381.       exectrap(tgetenv("TRAP"));
  382.        nextexit=2;unlock(&loclock);unlock(&globlock);fdunlock();
  383. !    }                    /* flush the logfile & exit procmail */
  384. !   elog("");exit(fakedelivery==2?EX_OK:retval);
  385.   }
  386.   
  387.   void suspend P((void))
  388. diff -rc old/src/regexp.c procmail/src/regexp.c
  389. *** old/src/regexp.c    Wed Jun 30 18:14:06 1993
  390. --- procmail/src/regexp.c    Fri Jul  2 17:36:24 1993
  391. ***************
  392. *** 8,14 ****
  393.    ************************************************************************/
  394.   #ifdef RCS
  395.   static /*const*/char rcsid[]=
  396. !  "$Id: regexp.c,v 1.27 1993/06/30 16:14:06 berg Exp $";
  397.   #endif
  398.   #include "procmail.h"
  399.   #include "robust.h"
  400. --- 8,14 ----
  401.    ************************************************************************/
  402.   #ifdef RCS
  403.   static /*const*/char rcsid[]=
  404. !  "$Id: regexp.c,v 1.28 1993/07/02 15:36:24 berg Exp $";
  405.   #endif
  406.   #include "procmail.h"
  407.   #include "robust.h"
  408. ***************
  409. *** 376,382 ****
  410.     static struct eps sempty={OPC_SEMPTY,&sempty};
  411.     sempty.spawn=initstack= &sempty;
  412.     if((initcode=code)->opc==OPC_EPS)
  413. !      initcode=(initstack=code)->next,code->spawn= &sempty;
  414.     thiss=Ceps&tswitch;th1=ioffsetof(struct chclass,pos1);
  415.     ot1=ioffsetof(struct chclass,pos2);str=text-1;len++;i='\n';goto setups;
  416.     do                  /* make sure any beginning-of-line-hooks catch */
  417. --- 376,382 ----
  418.     static struct eps sempty={OPC_SEMPTY,&sempty};
  419.     sempty.spawn=initstack= &sempty;
  420.     if((initcode=code)->opc==OPC_EPS)
  421. !      initcode=(initstack=code)+1,code->spawn= &sempty;
  422.     thiss=Ceps&tswitch;th1=ioffsetof(struct chclass,pos1);
  423.     ot1=ioffsetof(struct chclass,pos2);str=text-1;len++;i='\n';goto setups;
  424.     do                  /* make sure any beginning-of-line-hooks catch */
  425. --------------cut here---------
  426.  
  427. -- 
  428. Sincerely,                                  berg@pool.informatik.rwth-aachen.de
  429.            Stephen R. van den Berg (AKA BuGless).    berg@physik.tu-muenchen.de
  430.  
  431. "I have a *cunning* plan!"
  432.  
  433. exit 0 # Just in case...
  434.