Index: README.UPGRADING =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/README.UPGRADING,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- README.UPGRADING 1999/06/06 21:55:13 1.13 +++ README.UPGRADING 1999/06/10 17:47:13 1.14 @@ -18,7 +18,11 @@ the binary file formats of those files ARE NOT COMPATIBLE WITH BSD DB 1.85 PRODUCED ONES! The databases must be recompiled if that format is used! - + # cd $MAILVAR/db + # ../bin/newaliases + # ../bin/newfqdnaliases + # ../bin/newdb routes (et.al.) + # ../bin/policy-builder.sh -n ZMailer-2.99.50-s17 The SMTPSERVER no longer per default runs interactive Index: contrib/zmailstats =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/contrib/zmailstats,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- contrib/zmailstats 1998/02/10 21:01:44 1.1.1.1 +++ contrib/zmailstats 1999/06/10 17:47:33 1.2 @@ -388,7 +388,8 @@ while (<>) { ($x_month,$x_day,$x_time,$transport,$id,$flag,$x_address) = - /^(\w\w\w)\s(\d{1,2})\s(\d\d:\d\d:\d\d)\s\w*\s(\w*)\[\d*\]:\s([\d\w\.])*:\s(\w*)=(\<\S+\>)/; + /^(\w\w\w)\s{1,2}(\d{1,2})\s(\d\d:\d\d:\d\d)\s\w*\s(\w*)\[\d*\]:\s([\d\w\.])*:\s(\w*)=(\<\S+\>)/; + # Continue if invalid line if (!defined $flag || $transport eq "hold") { next }; # Assume 1997. This should be fixed somehow Index: libsh/interpret.c =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/libsh/interpret.c,v retrieving revision 1.23 retrieving revision 1.28 diff -u -r1.23 -r1.28 --- libsh/interpret.c 1999/06/03 07:39:51 1.23 +++ libsh/interpret.c 1999/06/11 10:44:10 1.28 @@ -98,6 +98,7 @@ } } +/* #define DEQUOTE_STICKY */ STATIC char *dequote __((const char *str, int len)); STATIC char * @@ -108,10 +109,18 @@ const char *sp, *ep; char *s, *s0; +#ifdef DEQUOTE_STICKY + memtypes stickytmp = stickymem; + stickymem = MEM_SHCMD; + /* fprintf(stderr,"dequote(\"%s\",%d) => ",str,len); */ + s0 = tmalloc(len+1); /* All subsequent runs will be smaller, + AND they fit running in-place! */ +#else s0 = emalloc(len+1); /* All subsequent runs will be smaller, AND they fit running in-place! */ +#endif do { @@ -150,6 +159,10 @@ /* fprintf(stderr,"\"%s\"\n",s0); */ +#ifdef DEQUOTE_STICKY + stickymem = stickytmp; +#endif + return (s0); } @@ -2284,15 +2297,18 @@ abort(); /* Too deep SIFTs! */ } sift[nsift].kind = 0; - sift[nsift].str = NULL; + sift[nsift].tlist = NULL; /* the other sift type */ + sift[nsift].str = NULL; /* this sift type */ sift[nsift].label = pc+1 - code; sift[nsift].subexps = NULL; sift[nsift].count = 9999; /* Cut eternal loops */ v_accessed = NULL; break; case sSiftBody: +#ifndef DEQUOTE_STICKY if (sift[nsift].str) free((void*)sift[nsift].str); +#endif sift[nsift].str = NULL; if (command->buffer != NULL) { if (cdr(command->buffer)) @@ -2365,8 +2381,11 @@ pc = sift[nsift].label - 1 + code; break; case sSiftPop: +#ifndef DEQUOTE_STICKY if (sift[nsift].str) free((void*)sift[nsift].str); +#endif + sift[nsift].str = NULL; for (v_accessed = sift[nsift].accessed; v_accessed != NULL; v_accessed = sift[nsift].accessed) { @@ -2423,9 +2442,15 @@ break; case sJumpIfRegmatch: stickytmp = stickymem; +#ifndef DEQUOTE_STICKY stickymem = MEM_PERM; if (sift[nsift].str == NULL) + sift[nsift].str = strdup(""); +#else + stickymem = MEM_SHCMD; + if (sift[nsift].str == NULL) sift[nsift].str = strsave(""); +#endif stickymem = stickytmp; setsubexps(&sift[nsift].subexps, re); if ((sift[nsift].count >= 0) && @@ -2447,6 +2472,7 @@ } sift[nsift].kind = 1; sift[nsift].tlist = NULL; + sift[nsift].str = NULL; /* the other branch */ sift[nsift].label = pc+1 - code; sift[nsift].subexps = NULL; sift[nsift].count = 9999; /* Cut eternal loops */ @@ -2529,6 +2555,7 @@ /* see comment above about freeing tokens */ if (sift[nsift].tlist) freeTokens(sift[nsift].tlist, MEM_SHCMD); + sift[nsift].tlist = NULL; for (v_accessed = sift[nsift].accessed; v_accessed != NULL; v_accessed = sift[nsift].accessed) { @@ -2606,6 +2633,19 @@ --variableIndex; } while (nsift >= 0) { +#ifndef DEQUOTE_STICKY + if (sift[nsift].str) + free((void*)sift[nsift].str); +#endif + sift[nsift].str = NULL; + + /* we don't *need* to free tokens because they are + allocated off our MEM_SHCMD memory stack */ + if (sift[nsift].tlist) + freeTokens(sift[nsift].tlist, MEM_SHCMD); + + sift[nsift].tlist = NULL; + for (v_accessed = sift[nsift].accessed; v_accessed != NULL; v_accessed = sift[nsift].accessed) { Index: router/functions.c =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/router/functions.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- router/functions.c 1999/05/30 04:05:58 1.27 +++ router/functions.c 1999/06/11 10:44:28 1.28 @@ -546,7 +546,7 @@ return 1; } - filename = argv[0]; + filename = argv[1]; /* Do one file, return value is 0 or 1, depending on actually doing something Index: router/rtsyslog.c =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/router/rtsyslog.c,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- router/rtsyslog.c 1999/05/30 01:31:48 1.3 +++ router/rtsyslog.c 1999/06/10 18:15:30 1.5 @@ -23,6 +23,8 @@ #include "ta.h" #include "libz.h" +static char lbuf[8000]; /* Should be aplenty.. */ + void rtsyslog(msgmtime,msgino,from,smtprelay,size,nrcpts,msgid) time_t msgmtime; @@ -30,7 +32,6 @@ char *from, *smtprelay, *msgid; int size, nrcpts; { - char linebuf[8000]; /* Should be aplenty.. */ char spoolid[30]; /* Min. space: 6+8+1 chars */ time_t now; static char *syslogflg = NULL; @@ -57,8 +58,8 @@ ctladdr=`getpwuid(rp->addr->misc)` mailer='rp->addr->channel' */ - sprintf(linebuf, "%s: from=<%.200s>, rrelay=%.200s, size=%d, nrcpts=%d, msgid=%.200s", + sprintf(lbuf, "%s: from=<%.200s>, rrelay=%.200s, size=%d, nrcpts=%d, msgid=%.200s", spoolid, from, smtprelay, size, nrcpts, msgid); - zsyslog((LOG_INFO, "%s", linebuf)); + zsyslog((LOG_INFO, "%s", lbuf)); } Index: smtpserver/policytest.c =================================================================== RCS file: /home/mea/src/CVSROOT/zmailer/smtpserver/policytest.c,v retrieving revision 1.39 retrieving revision 1.41 diff -u -r1.39 -r1.41 --- smtpserver/policytest.c 1999/06/08 00:11:41 1.39 +++ smtpserver/policytest.c 1999/06/11 11:53:29 1.41 @@ -1464,6 +1464,7 @@ if (check_domain(rel, state, phack+1, llen) != 0) return -1; at = phack; + *((int*)&len) = (1 + at - str) + llen; continue; }