home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / elm2.3patches / part06 < prev    next >
Text File  |  1991-03-05  |  31KB  |  970 lines

  1. Subject:  v24i030:  Elm mail system, release 2.3, patches, Part06/11
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: 5bf27109 76fd8687 23a6adda 44a9e40c
  5.  
  6. Submitted-by: Syd Weinstein <syd@DSI.COM>
  7. Posting-number: Volume 24, Issue 30
  8. Archive-name: elm2.3patches/part06
  9.  
  10. Subject: elm 2.3 Patch #6
  11. Summary: This is an official patch for elm 2.3 system.  Please apply it.
  12. Priority: LOW
  13.  
  14. The newly introduced function 'stricmp' has a name conflict with a libc
  15. function under SunOS 4.1.  Changed name to istrcmp.
  16. From: scs@lokkur.dexter.mi.us (Steve Simmons)
  17.  
  18. Change resync not to delete empty files
  19. From: Syd
  20.  
  21. the user's (unmodified) limit criteria was being compared w/
  22. the lower-case version of the header contents.
  23. From: dwolfe@earth.sps.mot.com (Dave Wolfe)
  24.  
  25. deal with several of the problems that have come up trying to use the MMDF
  26. submit program directly rather than going through the sendmail stub
  27. included with MMDF.  This should take care of the problem of not being
  28. able to send mail to usernames beginning with "i" and with the
  29. 'No valid author specified' problem.
  30. From: jac%brahms.tinton.ccur.com@RELAY.CS.NET
  31.  
  32. Fix to use time instead of bytes for changes to file and to process
  33. each entry on delete properly
  34. From: Denis Lambot <d241s016!lde@swn.siemens.be>
  35.  
  36.  
  37. Fix:    From rn, say "| patch -p -N -d DIR", where DIR is your elm source
  38.     directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
  39.     If you don't have the patch program, apply the following by hand,
  40.     or get patch (version 2.0, latest patchlevel).
  41.  
  42.     After patching:
  43.         sh Configure -d
  44.         make
  45.         make install
  46.  
  47.     If patch indicates that patchlevel is the wrong version, you may need
  48.     to apply one or more previous patches, or the patch may already
  49.     have been applied.  See the patchlevel.h file to find out what has or
  50.     has not been applied.  In any event, don't continue with the patch.
  51.  
  52.     If you are missing previous patches they can be obtained from our:
  53.     archive server.
  54.  
  55.     Syd Weinstein
  56.     elm@DSI.COM
  57.  
  58.     The patches are available from the dsinc archive server
  59.     Send the following message to archive-server@DSI.COM for
  60.     a list of available patches:
  61.  
  62.     Subject: patch list
  63.     send index elm
  64.  
  65. Index: hdrs/patchlevel.h
  66. Prereq: 5
  67. *** ../elm2.3/hdrs/patchlevel.h    Thu Jul 12 23:35:15 1990
  68. --- hdrs/patchlevel.h    Thu Jul 12 23:38:11 1990
  69. ***************
  70. *** 1 ****
  71. ! #define PATCHLEVEL 5
  72. --- 1 ----
  73. ! #define PATCHLEVEL 6
  74.  
  75. Index: Configure
  76. Prereq: 4.1.1.8
  77. *** ../elm2.3/Configure    Thu Jul 12 23:35:17 1990
  78. --- Configure    Wed Aug 15 22:42:35 1990
  79. ***************
  80. *** 8,14 ****
  81.   # and edit it to reflect your system.  Some packages may include samples
  82.   # of config.h for certain machines, so you might look for one of those.)
  83.   #
  84. ! # $Header: /files/home/users/syd/elm.rel/RCS/Configure,v 4.1.1.8 90/07/12 23:24:37 syd Exp $
  85.   #
  86.   # Yes, you may rip this off to use in other distribution packages.
  87.   # (Note: this Configure script was generated automatically.  Rather than
  88. --- 8,14 ----
  89.   # and edit it to reflect your system.  Some packages may include samples
  90.   # of config.h for certain machines, so you might look for one of those.)
  91.   #
  92. ! # $Header: /files/home/users/syd/elm.rel/RCS/Configure,v 4.1.1.9 90/08/15 22:42:11 syd Exp $
  93.   #
  94.   # Yes, you may rip this off to use in other distribution packages.
  95.   # (Note: this Configure script was generated automatically.  Rather than
  96. ***************
  97. *** 262,268 ****
  98.   attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
  99.   d_newshome="/usr/NeWS"
  100.   defvoidused=7
  101. ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb /usr/convex /usr/mmdf/bin ${BSDBASE-/bsd}/usr/ucb ${BSDBASE-/bsd}/bin ${BSDBASE-/bsd}/usr/bin"
  102.   
  103.   : check for out bin directory
  104.   if test ! -d ../bin; then
  105. --- 262,270 ----
  106.   attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
  107.   d_newshome="/usr/NeWS"
  108.   defvoidused=7
  109. ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/5bin /vol/local/bin /etc"
  110. ! pth="$pth /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
  111. ! pth="$pth /usr/convex /usr/mmdf/bin /usr/mmdf/lib ${BSDBASE-/bsd}/usr/ucb ${BSDBASE-/bsd}/bin ${BSDBASE-/bsd}/usr/bin"
  112.   
  113.   : check for out bin directory
  114.   if test ! -d ../bin; then
  115. ***************
  116. *** 3248,3254 ****
  117.   elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
  118.       echo "You have void (*signal())() instead of int."
  119.       d_voidsig="$define"
  120. ! elif $contains 'extern.*signal' $$.tmp >/dev/null 2>&1 ; then
  121.       echo "You have int (*signal())() instead of void."
  122.       d_voidsig="$undef"
  123.   elif $test -n "$d_voidsig"; then
  124. --- 3250,3256 ----
  125.   elif $contains 'void.*signal' $$.tmp >/dev/null 2>&1 ; then
  126.       echo "You have void (*signal())() instead of int."
  127.       d_voidsig="$define"
  128. ! elif $contains 'extern[     ]*signal' $$.tmp >/dev/null 2>&1 ; then
  129.       echo "You have int (*signal())() instead of void."
  130.       d_voidsig="$undef"
  131.   elif $test -n "$d_voidsig"; then
  132. ***************
  133. *** 3558,3567 ****
  134.   mailgrp=`$expr "$mailgrp" : "[ld][rwxstS-]*[ 0123456789]*\(.*\)"`
  135.   : now mailgrp is either    user group size mon day time/year name
  136.   : or                       group size mon day time/year name
  137. ! try1=`$expr "$mailgrp" : "[A-z0-9]* *\([A-z0-9]*\).*"`
  138.   try1a=`$expr "$try1" : "\([0-9]*\).*"`
  139.   if $test "$try1" = "$try1a"; then
  140. !     mailgrp=`$expr "$mailgrp" : "\([A-z0-9]*\).*"`
  141.   else
  142.       mailgrp="$try1"
  143.   fi
  144. --- 3560,3569 ----
  145.   mailgrp=`$expr "$mailgrp" : "[ld][rwxstS-]*[ 0123456789]*\(.*\)"`
  146.   : now mailgrp is either    user group size mon day time/year name
  147.   : or                       group size mon day time/year name
  148. ! try1=`$expr "$mailgrp" : "[A-Za-z_0-9]* *\([A-Za-z_0-9]*\).*"`
  149.   try1a=`$expr "$try1" : "\([0-9]*\).*"`
  150.   if $test "$try1" = "$try1a"; then
  151. !     mailgrp=`$expr "$mailgrp" : "\([A-Za-z_0-9]*\).*"`
  152.   else
  153.       mailgrp="$try1"
  154.   fi
  155.  
  156. Index: Patchlist
  157. *** ../elm2.3/Patchlist    Tue Jun 26 21:09:00 1990
  158. --- Patchlist    Wed Aug 15 22:44:50 1990
  159. ***************
  160. *** 1,3 ****
  161. --- 1,50 ----
  162. +     Elm 2.3 Patch 6 - Misc bug fixes
  163. +     Wed Aug 15 22:43:46 EDT 1990 (Creation date, not posting date)
  164. + The newly introduced function 'stricmp' has a name conflict with a libc
  165. + function under SunOS 4.1.  Changed name to istrcmp.
  166. + From: scs@lokkur.dexter.mi.us (Steve Simmons)
  167. + Change resync not to delete empty files
  168. + From: Syd
  169. + the user's (unmodified) limit criteria was being compared w/
  170. + the lower-case version of the header contents.
  171. + From: dwolfe@earth.sps.mot.com (Dave Wolfe)
  172. + deal with several of the problems that have come up trying to use the MMDF
  173. + submit program directly rather than going through the sendmail stub
  174. + included with MMDF.  This should take care of the problem of not being
  175. + able to send mail to usernames beginning with "i" and with the
  176. + 'No valid author specified' problem.
  177. + From: jac%brahms.tinton.ccur.com@RELAY.CS.NET
  178. + Fix to use time instead of bytes for changes to file and to process
  179. + each entry on delete properly
  180. + From: Denis Lambot <d241s016!lde@swn.siemens.be>
  181. +     Elm 2.3 Patch 5 - Misc bug fixes
  182. +     Thu Jul 12 23:37:22 EDT 1990 (Creation date, not posting date)
  183. + Be sure that output characters are not negative integers.
  184. + From: tct!chip@uunet.UU.NET (Chip Salzenberg)
  185. + patch fixes some minor typing mistakes in error messages
  186. + From: hz247bi@duc220.uni-duisburg.de (Bieniek)
  187. + Fix cursor getting lost on some system calls by forcing
  188. + an absolute move.
  189. + From: Syd, reported by Douglas Lamb
  190. + When Elm is compiled with the NO_XHEADER symbol defined, it failed
  191. + to put a blank line between the message header and message body.
  192. + From: mca@medicus.medicus.com (Mark Adams)
  193. + Fix MMDF case, where MSG_SEPERATOR has newline, buffer check
  194. + didnt, thus it didnt detect the MSG_SEPERATOR.
  195. + From: jbwaters@bsu-cs.bsu.edu (J. Brian Waters)
  196. + Make domain name checking case independent
  197. + From: Syd, reported by Steven Baur
  198.       Elm 2.3 Patch 4 - 8 Bit Changes
  199.       Tue Jun 26 20:45:13 EDT 1990 (Creation date, not posting date)
  200.   Fix encoding to encode lines that start with [ and are not
  201.  
  202. Index: src/aliaslib.c
  203. Prereq: 4.1.1.3
  204. *** ../elm2.3/src/aliaslib.c    Thu Jul 12 23:35:18 1990
  205. --- src/aliaslib.c    Thu Aug  2 21:57:55 1990
  206. ***************
  207. *** 1,8 ****
  208.   
  209. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.3 90/07/12 23:18:17 syd Exp $";
  210.   
  211.   /*******************************************************************************
  212. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  213.    *
  214.    *             Copyright (c) 1986, 1987 Dave Taylor
  215.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  216. --- 1,8 ----
  217.   
  218. ! static char rcsid[] = "@(#)$Id: aliaslib.c,v 4.1.1.4 90/08/02 21:57:53 syd Exp $";
  219.   
  220.   /*******************************************************************************
  221. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  222.    *
  223.    *             Copyright (c) 1986, 1987 Dave Taylor
  224.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  225. ***************
  226. *** 14,19 ****
  227. --- 14,24 ----
  228.    *
  229.    *******************************************************************************
  230.    * $Log:    aliaslib.c,v $
  231. +  * Revision 4.1.1.4  90/08/02  21:57:53  syd
  232. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  233. +  * function under SunOS 4.1.  Changed name to istrcmp.
  234. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  235. +  * 
  236.    * Revision 4.1.1.3  90/07/12  23:18:17  syd
  237.    * Make domain name checking case independent
  238.    * From: Syd, reported by Steven Baur
  239. ***************
  240. *** 286,292 ****
  241.   
  242.       loc = hash_it(word, size);
  243.   
  244. !     while (stricmp(word, table[loc].name) != 0) {
  245.         if (table[loc].name[0] == '\0')
  246.           return(-1);
  247.         loc = (loc + 1) % size;
  248. --- 291,297 ----
  249.   
  250.       loc = hash_it(word, size);
  251.   
  252. !     while (istrcmp(word, table[loc].name) != 0) {
  253.         if (table[loc].name[0] == '\0')
  254.           return(-1);
  255.         loc = (loc + 1) % size;
  256. ***************
  257. *** 296,302 ****
  258.   }
  259.   
  260.   int
  261. ! stricmp(s1,s2)
  262.   register char *s1, *s2;
  263.   {
  264.       /* case insensitive comparison */
  265. --- 301,307 ----
  266.   }
  267.   
  268.   int
  269. ! istrcmp(s1,s2)
  270.   register char *s1, *s2;
  271.   {
  272.       /* case insensitive comparison */
  273.  
  274. Index: src/init.c
  275. Prereq: 4.1.1.1
  276. *** ../elm2.3/src/init.c    Thu Jul 12 23:35:21 1990
  277. --- src/init.c    Thu Aug  2 21:57:58 1990
  278. ***************
  279. *** 1,8 ****
  280.   
  281. ! static char rcsid[] = "@(#)$Id: init.c,v 4.1.1.1 90/07/12 23:19:17 syd Exp $";
  282.   
  283.   /*******************************************************************************
  284. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  285.    *
  286.    *             Copyright (c) 1986, 1987 Dave Taylor
  287.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  288. --- 1,8 ----
  289.   
  290. ! static char rcsid[] = "@(#)$Id: init.c,v 4.1.1.2 90/08/02 21:57:56 syd Exp $";
  291.   
  292.   /*******************************************************************************
  293. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  294.    *
  295.    *             Copyright (c) 1986, 1987 Dave Taylor
  296.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  297. ***************
  298. *** 14,19 ****
  299. --- 14,24 ----
  300.    *
  301.    *******************************************************************************
  302.    * $Log:    init.c,v $
  303. +  * Revision 4.1.1.2  90/08/02  21:57:56  syd
  304. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  305. +  * function under SunOS 4.1.  Changed name to istrcmp.
  306. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  307. +  * 
  308.    * Revision 4.1.1.1  90/07/12  23:19:17  syd
  309.    * Make domain name checking case independent
  310.    * From: Syd, reported by Steven Baur
  311. ***************
  312. *** 267,273 ****
  313.       hostlen = strlen(hostname);
  314.       domlen = strlen(hostdomain);
  315.       if (hostlen >= domlen) {
  316. !       if (stricmp(&hostname[hostlen - domlen], hostdomain) == 0)
  317.           strcpy(hostfullname, hostname);
  318.         else {
  319.           strcpy(hostfullname, hostname);
  320. --- 272,278 ----
  321.       hostlen = strlen(hostname);
  322.       domlen = strlen(hostdomain);
  323.       if (hostlen >= domlen) {
  324. !       if (istrcmp(&hostname[hostlen - domlen], hostdomain) == 0)
  325.           strcpy(hostfullname, hostname);
  326.         else {
  327.           strcpy(hostfullname, hostname);
  328. ***************
  329. *** 274,280 ****
  330.           strcat(hostfullname, hostdomain);
  331.         }
  332.       } else {
  333. !       if (stricmp(hostname, hostdomain + 1) == 0)
  334.           strcpy(hostfullname, hostname);
  335.         else {
  336.           strcpy(hostfullname, hostname);
  337. --- 279,285 ----
  338.           strcat(hostfullname, hostdomain);
  339.         }
  340.       } else {
  341. !       if (istrcmp(hostname, hostdomain + 1) == 0)
  342.           strcpy(hostfullname, hostname);
  343.         else {
  344.           strcpy(hostfullname, hostname);
  345.  
  346. Index: src/leavembox.c
  347. Prereq: 4.1.1.3
  348. *** ../elm2.3/src/leavembox.c    Fri Jun 22 00:00:02 1990
  349. --- src/leavembox.c    Wed Aug 15 21:00:23 1990
  350. ***************
  351. *** 1,8 ****
  352.   
  353. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.3 90/06/21 22:51:52 syd Exp $";
  354.   
  355.   /*******************************************************************************
  356. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  357.    *
  358.    *             Copyright (c) 1986, 1987 Dave Taylor
  359.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  360. --- 1,8 ----
  361.   
  362. ! static char rcsid[] = "@(#)$Id: leavembox.c,v 4.1.1.4 90/08/15 21:00:07 syd Exp $";
  363.   
  364.   /*******************************************************************************
  365. !  *  The Elm Mail System  -  $Revision: 4.1.1.4 $   $State: Exp $
  366.    *
  367.    *             Copyright (c) 1986, 1987 Dave Taylor
  368.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  369. ***************
  370. *** 14,19 ****
  371. --- 14,23 ----
  372.    *
  373.    *******************************************************************************
  374.    * $Log:    leavembox.c,v $
  375. +  * Revision 4.1.1.4  90/08/15  21:00:07  syd
  376. +  * Change elm to not delete empty folders on a resync
  377. +  * From: Syd
  378. +  * 
  379.    * Revision 4.1.1.3  90/06/21  22:51:52  syd
  380.    * Add time.h to includes as some OSs include needed substructure only
  381.    * from time.h
  382. ***************
  383. *** 452,458 ****
  384.         }
  385.         dprint(2, (debugfile, "\n\n"));
  386.   
  387. !     } else if (folder_type == NON_SPOOL && !keep_empty_files) {
  388.   
  389.         /* i.e. if no messages were to be kept and this is not a spool
  390.          * folder and we aren't keeping empty non-spool folders,
  391. --- 456,462 ----
  392.         }
  393.         dprint(2, (debugfile, "\n\n"));
  394.   
  395. !     } else if (folder_type == NON_SPOOL && !keep_empty_files && !resyncing) {
  396.   
  397.         /* i.e. if no messages were to be kept and this is not a spool
  398.          * folder and we aren't keeping empty non-spool folders,
  399. ***************
  400. *** 557,563 ****
  401.         /* link or copy complete - remove temp keep file */
  402.         unlink(temp_keep_file);
  403.   
  404. !     } else if(folder_type == SPOOL || keep_empty_files) {
  405.   
  406.         /* if this is an empty spool file, or if this is an empty non spool 
  407.          * file and we keep empty non spool files (we always keep empty
  408. --- 561,567 ----
  409.         /* link or copy complete - remove temp keep file */
  410.         unlink(temp_keep_file);
  411.   
  412. !     } else if(folder_type == SPOOL || keep_empty_files || resyncing) {
  413.   
  414.         /* if this is an empty spool file, or if this is an empty non spool 
  415.          * file and we keep empty non spool files (we always keep empty
  416.  
  417. Index: src/mailmsg2.c
  418. Prereq: 4.1.1.6
  419. *** ../elm2.3/src/mailmsg2.c    Thu Jul 12 23:35:22 1990
  420. --- src/mailmsg2.c    Wed Aug 15 22:02:41 1990
  421. ***************
  422. *** 1,8 ****
  423.   
  424. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.6 90/07/12 23:19:20 syd Exp $";
  425.   
  426.   /*******************************************************************************
  427. !  *  The Elm Mail System  -  $Revision: 4.1.1.6 $   $State: Exp $
  428.    *
  429.    *             Copyright (c) 1986, 1987 Dave Taylor
  430.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  431. --- 1,8 ----
  432.   
  433. ! static char rcsid[] = "@(#)$Id: mailmsg2.c,v 4.1.1.7 90/08/15 22:02:36 syd Exp $";
  434.   
  435.   /*******************************************************************************
  436. !  *  The Elm Mail System  -  $Revision: 4.1.1.7 $   $State: Exp $
  437.    *
  438.    *             Copyright (c) 1986, 1987 Dave Taylor
  439.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  440. ***************
  441. *** 14,19 ****
  442. --- 14,27 ----
  443.    *
  444.    *******************************************************************************
  445.    * $Log:    mailmsg2.c,v $
  446. +  * Revision 4.1.1.7  90/08/15  22:02:36  syd
  447. +  * deal with several of the problems that have come up trying to use the MMDF
  448. +  * submit program directly rather than going through the sendmail stub
  449. +  * included with MMDF.  This should take care of the problem of not being
  450. +  * able to send mail to usernames beginning with "i" and with the
  451. +  * 'No valid author specified' problem.
  452. +  * From: jac%brahms.tinton.ccur.com@RELAY.CS.NET
  453. +  * 
  454.    * Revision 4.1.1.6  90/07/12  23:19:20  syd
  455.    * Make domain name checking case independent
  456.    * From: Syd, reported by Steven Baur
  457. ***************
  458. *** 370,377 ****
  459.         else
  460.           mailerflags[0] ='\0';
  461.   
  462. !       quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
  463. !       strcpy(expanded_to, very_long_buffer);
  464.   
  465.         sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  466.           mailer, mailerflags, expanded_to,
  467. --- 378,389 ----
  468.         else
  469.           mailerflags[0] ='\0';
  470.   
  471. !       if (strcmp(submitmail, mailer) == 0)
  472. !         strcpy(expanded_to, " ");
  473. !       else {
  474. !         quote_args(very_long_buffer, strip_parens(strip_commas(expanded_to)));
  475. !         strcpy(expanded_to, very_long_buffer);
  476. !       }
  477.   
  478.         sprintf(very_long_buffer,"( (%s %s %s ; %s %s) & ) < %s", 
  479.           mailer, mailerflags, expanded_to,
  480. ***************
  481. *** 673,678 ****
  482. --- 685,693 ----
  483.       char  buffer[SLEN];
  484.       int   is_hidden_user;        /* someone we should know about?  */
  485.   #endif
  486. + #ifdef MMDF
  487. +     int   is_submit_mailer;        /* using submit means change From: */
  488. + #endif /* MMDF */
  489.   
  490.       char  *get_arpa_date();
  491.   
  492. ***************
  493. *** 738,758 ****
  494.       fprintf(filedesc,"Date: %s\n", get_arpa_date());
  495.   
  496.   #ifndef DONT_ADD_FROM
  497.   # ifdef SITE_HIDING
  498.       if (is_hidden_user)
  499.         fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  500.             hostname, HIDDEN_SITE_NAME, username);
  501.       else
  502.   # else
  503.   #  ifdef  INTERNET
  504.   #   ifdef  USE_DOMAIN
  505. !     fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  506.           username, hostfullname);
  507.   #   else
  508.       fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  509.           username, hostname);
  510.   #   endif
  511.   #  else
  512.       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  513.           hostname, username);
  514.   #  endif
  515. --- 753,798 ----
  516.       fprintf(filedesc,"Date: %s\n", get_arpa_date());
  517.   
  518.   #ifndef DONT_ADD_FROM
  519. + #ifdef MMDF
  520. +     is_submit_mailer = (strcmp(submitmail,mailer) == 0);
  521. + #endif /* MMDF */
  522.   # ifdef SITE_HIDING
  523. + #    ifdef MMDF
  524. +     if (is_submit_mailer)
  525. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  526. +     else
  527. + #    endif /* MMDF */
  528.       if (is_hidden_user)
  529.         fprintf(filedesc,"From: %s <%s!%s!%s>\n", full_username,
  530.             hostname, HIDDEN_SITE_NAME, username);
  531.       else
  532. +       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  533. +           hostname, username);
  534.   # else
  535.   #  ifdef  INTERNET
  536.   #   ifdef  USE_DOMAIN
  537. ! #    ifdef MMDF
  538. !     if (is_submit_mailer)
  539. !       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  540. !     else
  541. ! #    endif /* MMDF */
  542. !       fprintf(filedesc,"From: %s <%s@%s>\n", full_username, 
  543.           username, hostfullname);
  544.   #   else
  545. + #    ifdef MMDF
  546. +     if (is_submit_mailer)
  547. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  548. +     else
  549. + #    endif /* MMDF */
  550.       fprintf(filedesc,"From: %s <%s@%s>\n", full_username,
  551.           username, hostname);
  552.   #   endif
  553.   #  else
  554. + #    ifdef MMDF
  555. +     if (is_submit_mailer)
  556. +       fprintf(filedesc,"From: %s <%s>\n", full_username, username);
  557. +     else
  558. + #    endif /* MMDF */
  559.       fprintf(filedesc,"From: %s <%s!%s>\n", full_username,
  560.           hostname, username);
  561.   #  endif
  562.  
  563. Index: src/strings.c
  564. Prereq: 4.1.1.2
  565. *** ../elm2.3/src/strings.c    Fri Jun 22 00:00:05 1990
  566. --- src/strings.c    Wed Aug 15 21:48:09 1990
  567. ***************
  568. *** 1,8 ****
  569.   
  570. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.2 90/06/21 22:45:06 syd Exp $";
  571.   
  572.   /*******************************************************************************
  573. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  574.    *
  575.    *             Copyright (c) 1986, 1987 Dave Taylor
  576.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  577. --- 1,8 ----
  578.   
  579. ! static char rcsid[] = "@(#)$Id: strings.c,v 4.1.1.3 90/08/15 21:48:07 syd Exp $";
  580.   
  581.   /*******************************************************************************
  582. !  *  The Elm Mail System  -  $Revision: 4.1.1.3 $   $State: Exp $
  583.    *
  584.    *             Copyright (c) 1986, 1987 Dave Taylor
  585.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  586. ***************
  587. *** 14,19 ****
  588. --- 14,24 ----
  589.    *
  590.    *******************************************************************************
  591.    * $Log:    strings.c,v $
  592. +  * Revision 4.1.1.3  90/08/15  21:48:07  syd
  593. +  * the user's (unmodified) limit criteria was being compared w/
  594. +  * the lower-case version of the header contents.
  595. +  * From: dwolfe@earth.sps.mot.com (Dave Wolfe)
  596. +  * 
  597.    * Revision 4.1.1.2  90/06/21  22:45:06  syd
  598.    * Make display not show To user if user is also sender
  599.    * From: Marius Olafsson
  600. ***************
  601. *** 364,372 ****
  602.   
  603.       for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  604.         if (islower(*buffer))
  605. -         *first = tolower(*buffer);
  606. -       else
  607.           *first = *buffer;
  608.   
  609.       *first = '\0';
  610.       
  611. --- 369,377 ----
  612.   
  613.       for (; *buffer && ! whitespace(*buffer); buffer++, first++)
  614.         if (islower(*buffer))
  615.           *first = *buffer;
  616. +       else
  617. +         *first = tolower(*buffer);
  618.   
  619.       *first = '\0';
  620.       
  621. ***************
  622. *** 374,382 ****
  623.   
  624.       for (; *buffer; buffer++, rest++)
  625.         if (islower(*buffer))
  626. -         *rest = tolower(*buffer);
  627. -       else
  628.           *rest = *buffer;
  629.   
  630.       *rest = '\0';
  631.   
  632. --- 379,387 ----
  633.   
  634.       for (; *buffer; buffer++, rest++)
  635.         if (islower(*buffer))
  636.           *rest = *buffer;
  637. +       else
  638. +         *rest = tolower(*buffer);
  639.   
  640.       *rest = '\0';
  641.   
  642.  
  643. Index: utils/arepdaem.c
  644. Prereq: 4.1
  645. *** ../elm2.3/utils/arepdaem.c    Sat Apr 28 22:44:34 1990
  646. --- utils/arepdaem.c    Wed Aug 15 22:50:27 1990
  647. ***************
  648. *** 1,8 ****
  649.   
  650. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1 90/04/28 22:44:33 syd Exp $";
  651.   
  652.   /*******************************************************************************
  653. !  *  The Elm Mail System  -  $Revision: 4.1 $   $State: Exp $
  654.    *
  655.    *             Copyright (c) 1986, 1987 Dave Taylor
  656.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  657. --- 1,8 ----
  658.   
  659. ! static char rcsid[] = "@(#)$Id: arepdaem.c,v 4.1.1.2 90/08/15 22:50:14 syd Exp $";
  660.   
  661.   /*******************************************************************************
  662. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  663.    *
  664.    *             Copyright (c) 1986, 1987 Dave Taylor
  665.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  666. ***************
  667. *** 14,19 ****
  668. --- 14,28 ----
  669.    *
  670.    *******************************************************************************
  671.    * $Log:    arepdaem.c,v $
  672. +  * Revision 4.1.1.2  90/08/15  22:50:14  syd
  673. +  * Fix last size to time call
  674. +  * From: Syd
  675. +  * 
  676. +  * Revision 4.1.1.1  90/08/15  22:33:54  syd
  677. +  * Fix to use time instead of bytes for changes to file and to process
  678. +  * each entry on delete properly
  679. +  * From: Denis Lambot <d241s016!lde@swn.siemens.be>
  680. +  * 
  681.    * Revision 4.1  90/04/28  22:44:33  syd
  682.    * checkin of Elm 2.3 as of Release PL0
  683.    * 
  684. ***************
  685. *** 93,104 ****
  686.         } reply_table[MAX_PEOPLE];
  687.   
  688.   FILE  *logfd;                /* logfile (log action)   */
  689. ! long  autoreply_size = 0L;        /* size of autoreply file */
  690.   int   active = 0;            /* # of people 'enrolled' */
  691.   
  692.   FILE  *open_logfile();            /* forward declaration    */
  693.   
  694.   long  bytes();                /*       ditto           */
  695.   
  696.   #ifdef VOIDSIG
  697.   void    term_signal();
  698. --- 102,114 ----
  699.         } reply_table[MAX_PEOPLE];
  700.   
  701.   FILE  *logfd;                /* logfile (log action)   */
  702. ! time_t autoreply_time = 0L;        /* modif date of autoreply file */
  703.   int   active = 0;            /* # of people 'enrolled' */
  704.   
  705.   FILE  *open_logfile();            /* forward declaration    */
  706.   
  707.   long  bytes();                /*       ditto           */
  708. + time_t ModTime();            /*       ditto          */
  709.   
  710.   #ifdef VOIDSIG
  711.   void    term_signal();
  712. ***************
  713. *** 110,115 ****
  714. --- 120,126 ----
  715.   {
  716.       long size;
  717.       int  person, data_changed;
  718. +     time_t time;
  719.   
  720.       if (fork()) exit(0);
  721.   
  722. ***************
  723. *** 133,141 ****
  724.   
  725.         /* 1. check to see if autoreply table has changed.. */
  726.   
  727. !       if ((size = bytes(autoreply_file)) != autoreply_size) {
  728.           read_autoreply_file(); 
  729. !         autoreply_size = size;
  730.         }
  731.   
  732.         /* 2. now for each active person... */
  733. --- 144,152 ----
  734.   
  735.         /* 1. check to see if autoreply table has changed.. */
  736.   
  737. !       if ((time = ModTime(autoreply_file)) != autoreply_time) {
  738.           read_autoreply_file(); 
  739. !         autoreply_time = time;
  740.         }
  741.   
  742.         /* 2. now for each active person... */
  743. ***************
  744. *** 169,175 ****
  745.   int
  746.   read_autoreply_file()
  747.   {
  748. !     /** We're here because the autoreply file has changed size!!  It
  749.           could either be because someone has been added or because
  750.           someone has been removed...since the list will always be in
  751.           order (nice, eh?) we should have a pretty easy time of it...
  752. --- 180,186 ----
  753.   int
  754.   read_autoreply_file()
  755.   {
  756. !     /** We're here because the autoreply file has changed!!  It
  757.           could either be because someone has been added or because
  758.           someone has been removed...since the list will always be in
  759.           order (nice, eh?) we should have a pretty easy time of it...
  760. ***************
  761. *** 217,226 ****
  762.   
  763.       /** now check to see if anyone has been removed... **/
  764.   
  765. !     for (person = 0; person < active; person++)
  766. !       if (reply_table[person].in_list == 0) {
  767. !          log("removing %s from the active list", 
  768. !           reply_table[person].username);
  769.           strcpy(reply_table[person].username, 
  770.              reply_table[active-1].username);
  771.           strcpy(reply_table[person].mailfile, 
  772. --- 228,241 ----
  773.   
  774.       /** now check to see if anyone has been removed... **/
  775.   
  776. !     person = 0;
  777. !     while (person < active)
  778. !       if (reply_table[person].in_list) {
  779. !         person++;
  780. !       }
  781. !       else {
  782. !         log("removing %s from the active list",
  783. !            reply_table[person].username);
  784.           strcpy(reply_table[person].username, 
  785.              reply_table[active-1].username);
  786.           strcpy(reply_table[person].mailfile, 
  787. ***************
  788. *** 253,259 ****
  789.       fclose(file);
  790.   
  791.   /*    printf("updated autoreply file\n"); */
  792. !     autoreply_size = bytes(autoreply_file);
  793.   }
  794.   
  795.   int
  796. --- 268,274 ----
  797.       fclose(file);
  798.   
  799.   /*    printf("updated autoreply file\n"); */
  800. !     autoreply_time = ModTime(autoreply_file);
  801.   }
  802.   
  803.   int
  804. ***************
  805. *** 462,467 ****
  806. --- 477,504 ----
  807.           ok = 0;
  808.       
  809.       return(ok ? buffer.st_size : 0);
  810. + }
  811. + time_t
  812. + ModTime(name)
  813. + char *name;
  814. + {
  815. +     /** return the modification time in the specified file.
  816. +         This is to check to see if autoreply has changed....  **/
  817. +     int ok = 1;
  818. +     extern int errno;    /* system error number! */
  819. +     struct stat buffer;
  820. +     if (stat(name, &buffer) != 0)
  821. +       if (errno != 2) {
  822. +        unlock();
  823. +        exit(fprintf(stderr,"Error %d attempting fstat on %s", errno, name));
  824. +       }
  825. +       else
  826. +         ok = 0;
  827. +     return(ok ? buffer.st_mtime : (time_t) 0);
  828.   }
  829.   
  830.   mail(to, subject, filename, person)
  831.  
  832. Index: utils/newalias.c
  833. Prereq: 4.1.1.1
  834. *** ../elm2.3/utils/newalias.c    Tue Jun  5 22:02:39 1990
  835. --- utils/newalias.c    Thu Aug  2 21:58:01 1990
  836. ***************
  837. *** 1,8 ****
  838.   
  839. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.1 90/06/05 21:11:20 syd Exp $";
  840.   
  841.   /*******************************************************************************
  842. !  *  The Elm Mail System  -  $Revision: 4.1.1.1 $   $State: Exp $
  843.    *
  844.    *             Copyright (c) 1986, 1987 Dave Taylor
  845.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  846. --- 1,8 ----
  847.   
  848. ! static char rcsid[] = "@(#)$Id: newalias.c,v 4.1.1.2 90/08/02 21:57:58 syd Exp $";
  849.   
  850.   /*******************************************************************************
  851. !  *  The Elm Mail System  -  $Revision: 4.1.1.2 $   $State: Exp $
  852.    *
  853.    *             Copyright (c) 1986, 1987 Dave Taylor
  854.    *             Copyright (c) 1988, 1989, 1990 USENET Community Trust
  855. ***************
  856. *** 14,19 ****
  857. --- 14,24 ----
  858.    *
  859.    *******************************************************************************
  860.    * $Log:    newalias.c,v $
  861. +  * Revision 4.1.1.2  90/08/02  21:57:58  syd
  862. +  * The newly introduced function 'stricmp' has a name conflict with a libc
  863. +  * function under SunOS 4.1.  Changed name to istrcmp.
  864. +  * From: scs@lokkur.dexter.mi.us (Steve Simmons)
  865. +  * 
  866.    * Revision 4.1.1.1  90/06/05  21:11:20  syd
  867.    * alias command in ELM2.3 fails because of the wrong sized aliases.hash
  868.    * newalias did not truncate existing file (aliases.hash)
  869. ***************
  870. *** 404,410 ****
  871.   
  872.       loc = hash_it(word, size);
  873.   
  874. !     while (table[loc].name[0] != '\0' && stricmp(table[loc].name,word) != 0)
  875.         loc = (loc + 1) % size; 
  876.   
  877.       if (table[loc].name[0] == '\0') {
  878. --- 409,415 ----
  879.   
  880.       loc = hash_it(word, size);
  881.   
  882. !     while (table[loc].name[0] != '\0' && istrcmp(table[loc].name,word) != 0)
  883.         loc = (loc + 1) % size; 
  884.   
  885.       if (table[loc].name[0] == '\0') {
  886. ***************
  887. *** 417,423 ****
  888.   }
  889.   
  890.   int
  891. ! stricmp(s1,s2)
  892.   register char *s1, *s2;
  893.   {
  894.       /* case insensitive comparison */
  895. --- 422,428 ----
  896.   }
  897.   
  898.   int
  899. ! istrcmp(s1,s2)
  900.   register char *s1, *s2;
  901.   {
  902.       /* case insensitive comparison */
  903. ***************
  904. *** 530,540 ****
  905.       if (hash_table_loaded || is_system) {
  906.         loc = hash_it(name, MAX_SALIASES);
  907.   
  908. !       while (stricmp(name, shash_table[loc].name) != 0 && 
  909.                    shash_table[loc].name[0] != '\0')
  910.           loc = (loc + 1) % MAX_SALIASES; 
  911.     
  912. !       if (stricmp(name, shash_table[loc].name) == 0)
  913.           return(1);    /* found it! */
  914.       }
  915.   
  916. --- 535,545 ----
  917.       if (hash_table_loaded || is_system) {
  918.         loc = hash_it(name, MAX_SALIASES);
  919.   
  920. !       while (istrcmp(name, shash_table[loc].name) != 0 && 
  921.                    shash_table[loc].name[0] != '\0')
  922.           loc = (loc + 1) % MAX_SALIASES; 
  923.     
  924. !       if (istrcmp(name, shash_table[loc].name) == 0)
  925.           return(1);    /* found it! */
  926.       }
  927.   
  928. ***************
  929. *** 541,551 ****
  930.       if (! is_system) {    /* okay! Let's check the user alias file! */
  931.         loc = hash_it(name, MAX_UALIASES);
  932.   
  933. !       while (stricmp(name, uhash_table[loc].name) != 0 && 
  934.                    uhash_table[loc].name[0] != '\0')
  935.           loc = (loc + 1) % MAX_UALIASES; 
  936.   
  937. !       if (stricmp(name, uhash_table[loc].name) == 0)
  938.           return(1);    /* found it! */
  939.       }
  940.   
  941. --- 546,556 ----
  942.       if (! is_system) {    /* okay! Let's check the user alias file! */
  943.         loc = hash_it(name, MAX_UALIASES);
  944.   
  945. !       while (istrcmp(name, uhash_table[loc].name) != 0 && 
  946.                    uhash_table[loc].name[0] != '\0')
  947.           loc = (loc + 1) % MAX_UALIASES; 
  948.   
  949. !       if (istrcmp(name, uhash_table[loc].name) == 0)
  950.           return(1);    /* found it! */
  951.       }
  952.   
  953.  
  954. exit 0 # Just in case...
  955.