Newsgroups: comp.sources.unix From: barnett@crdgw1.ge.com (Bruce G. Barnett) Subject: v27i088: Ease 3.5 - high-level sendmail.cf language, Patch06 Sender: unix-sources-moderator@gw.home.vix.com Approved: vixie@gw.home.vix.com Submitted-By: barnett@crdgw1.ge.com (Bruce G. Barnett) Posting-Number: Volume 27, Issue 88 Archive-Name: ease3.5/patch06 Ease 3.6 adds support for AIX's sendmail, plus some bug fixes... -------------------------- This is an official patch that converts Ease 3.5 to Ease 3.6 Usage: patch -p ) Stephen Schaefer of Bowling Green State University, Raymond A. Schnitzler of Bellcore, Andrew Partan of the Corporation for Open Systems, *************** *** 171,176 **** --- 172,178 ---- -s => SunOS -i => IDA sendmail -d => Ultrix + -a => A/IX -C [..] => add predefined classes e.g. -C ADG => added classes A, B, and G *************** *** 207,212 **** --- 209,215 ---- Release Notes: + 3.6: Added A/IX support 3.5: Documentation and Copyright changes, doc/makefile changed 3.4: *** ../3.5/cfc/cfc.c Tue Nov 26 16:41:33 1991 --- cfc/cfc.c Fri May 15 16:52:02 1992 *************** *** 1,9 **** #ifndef lint ! static char RCSid[] = "$Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/cfc/RCS/cfc.c,v 3.3 1991/09/09 16:34:44 barnett Exp $"; #endif /* * $Log: cfc.c,v $ * Revision 3.3 1991/09/09 16:34:44 barnett * Bug fixes. Better handling of those $? conditionals. * --- 1,12 ---- #ifndef lint ! static char RCSid[] = "$Header: /home/alydar/u0/barnett/Src/Ease/ease/cfc/RCS/cfc.c,v 3.4 1992/05/15 20:45:23 barnett Exp $"; #endif /* * $Log: cfc.c,v $ + * Revision 3.4 1992/05/15 20:45:23 barnett + * Added A/IX support + * * Revision 3.3 1991/09/09 16:34:44 barnett * Bug fixes. Better handling of those $? conditionals. * *************** *** 93,101 **** int ida = 0; /* IDA sendmail options */ int sunos = 0; /* Special parsing for SunOS - bgb */ int DECos = 0; /* Special parsing for Ultrix - bgb */ /* NOTE: can't use 'ultrix' cause of cpp */ int hpos = 0; /* HP/UX */ ! char *classes = 0; /* list of classes defined */ main (argc, argv) int argc; --- 96,109 ---- int ida = 0; /* IDA sendmail options */ int sunos = 0; /* Special parsing for SunOS - bgb */ int DECos = 0; /* Special parsing for Ultrix - bgb */ + int aix_os = 0; /* Special parsing for AIX - bgb */ /* NOTE: can't use 'ultrix' cause of cpp */ int hpos = 0; /* HP/UX */ ! int ifset; /* make it a global variable ! true if in $? ... $| ... $. */ ! int quoting; /* same with quoting ! * Typically turned on after an ifset(( X, " ! */ char *classes = 0; /* list of classes defined */ main (argc, argv) int argc; *************** *** 106,113 **** extern char *optarg; int i,c; ! while ((c = getopt (argc, argv, "icdhusC:")) != EOF) { switch (c) { case 'c': compat = 1; break; --- 114,124 ---- extern char *optarg; int i,c; ! while ((c = getopt (argc, argv, "acdhisuC:")) != EOF) { switch (c) { + case 'a': + aix_os = 1; + break; case 'c': compat = 1; break; *************** *** 141,147 **** "warning: ignoring non-flag command line arguments\n"); printf ("/***********************************************************/\n"); ! printf ("/* This ease file generated by cfc version $Revision: 3.3 $*/\n"); printf ("/* automatically from a sendmail.cf file */\n"); printf ("/* It may need to be edited before feeding to ease. */\n"); printf ("/***********************************************************/\n"); --- 152,158 ---- "warning: ignoring non-flag command line arguments\n"); printf ("/***********************************************************/\n"); ! printf ("/* This ease file generated by cfc version $Revision: 3.4 $*/\n"); printf ("/* automatically from a sendmail.cf file */\n"); printf ("/* It may need to be edited before feeding to ease. */\n"); printf ("/***********************************************************/\n"); *************** *** 294,300 **** } } /* let's make the default configuration nicer for SunOS - bgb */ ! if (DECos || ida || hpos ) { printf ("\tany_in_myhostname : match (1) in c_myname;\n"); } if (sunos) { --- 305,311 ---- } } /* let's make the default configuration nicer for SunOS - bgb */ ! if (DECos || ida || hpos || aix_os) { printf ("\tany_in_myhostname : match (1) in c_myname;\n"); } if (sunos) { *************** *** 332,342 **** /* first, split it up into LHS, RHS, COMMENT */ ! while (cp && *cp && *cp != '\t') ! cp++; if (!*cp) { fprintf(stderr, ! "Unexpected EOL when expecting right hand side of rule\n"); lhs(buffer+1); printf("\n\tMissingRightHandSide();\n"); return; --- 343,358 ---- /* first, split it up into LHS, RHS, COMMENT */ ! if (aix_os ) { ! while (cp && *cp && *cp != '\t' && *cp != ' ') ! cp++; ! } else { ! while (cp && *cp && *cp != '\t') ! cp++; ! } if (!*cp) { fprintf(stderr, ! "Unexpected EOL when expecting right hand side of rule, line: %d\n", line); lhs(buffer+1); printf("\n\tMissingRightHandSide();\n"); return; *************** *** 344,363 **** *cp = '\0'; cp++; ! while (cp && *cp && *cp == '\t') ! cp++; ! cp2 = cp; ! while (cp && *cp && *cp != '\t') ! cp++; ! if (*cp == '\t' && cp[1]) ! { ! *cp = '\0'; ! com++; ! cp++; ! while (cp && *cp && *cp == '\t') ! cp++; } - - /* now print */ lhs (buffer + 1); /* left hand side */ if (com) --- 360,394 ---- *cp = '\0'; cp++; ! if (aix_os) { ! while (cp && *cp && ((*cp == ' ') || (*cp == '\t'))) ! cp++; ! cp2 = cp; /* cp2 points to rhs */ ! while (cp && *cp && *cp != ' ') ! cp++; ! if (*cp == ' ' && cp[1]) ! { ! *cp = '\0'; ! com++; ! cp++; ! while (cp && *cp && ((*cp == ' ') || (*cp == '\t'))) ! cp++; ! } ! } else { ! while (cp && *cp && *cp == '\t') ! cp++; ! cp2 = cp; ! while (cp && *cp && *cp != '\t') ! cp++; ! if (*cp == '\t' && cp[1]) ! { ! *cp = '\0'; ! com++; ! cp++; ! while (cp && *cp && *cp == '\t') ! cp++; ! } } /* now print */ lhs (buffer + 1); /* left hand side */ if (com) *************** *** 373,381 **** { register char *cp = text; register int conditional = 0; - - register int quoting = 0; register int open = 0; ! int ifset = 0; printf ("\tif ("); for (; *cp; cp++) --- 404,412 ---- { register char *cp = text; register int conditional = 0; register int open = 0; ! ifset = 0; ! quoting = 0; printf ("\tif ("); for (; *cp; cp++) *************** *** 384,390 **** case '$': if (quoting) { ! quoting = 0; putchar ('"'); } switch (*++cp) { --- 415,421 ---- case '$': if (quoting) { ! quoting = 0; /* turn it off */ putchar ('"'); } switch (*++cp) { *************** *** 400,406 **** case '=': switch(*++cp) { case 'w': ! if (sunos || ida || DECos ) { printf (" any_in_myhostname "); break; } /* else fall through */ --- 431,437 ---- case '=': switch(*++cp) { case 'w': ! if (sunos || ida || DECos || aix_os || hpos ) { printf (" any_in_myhostname "); break; } /* else fall through */ *************** *** 429,435 **** conditional++;ifset++; break; case '|': ! if ( ! conditional) complain("in left hand side of rule, found a '$|' without a previous '$?'"); if ( ifset) { /* I don't think I have to output a ", " */ /* but let's test */ --- 460,466 ---- conditional++;ifset++; break; case '|': ! if ( ! ifset) complain("in left hand side of rule, found a '$|' without a previous '$?'"); if ( ifset) { /* I don't think I have to output a ", " */ /* but let's test */ *************** *** 504,514 **** break; } } ! if (quoting) ! putchar ('"'); while (open--) putchar (')'); ! if (conditional) { /* the lhs was missing a $. - let's add one automatically */ complain ("Expected '$.' on left hand side of rule - adding one anyway"); putchar (')'); --- 535,547 ---- break; } } ! if (quoting) { ! quoting = 0; ! putchar ('"'); ! } while (open--) putchar (')'); ! if (ifset) { /* the lhs was missing a $. - let's add one automatically */ complain ("Expected '$.' on left hand side of rule - adding one anyway"); putchar (')'); *************** *** 527,534 **** char *cp1; register int open = 0; register int conditional = 0; /* true if in an ifset condition */ ! register int quoting = 0; /* true if in a string */ ! register int ifset = 0; /* true if in ifset(), like quoting */ register int needconcat = 0; /* true if an $? on line (lookahead) */ register int didconcat = 0; /* true if did the concat() */ register int indbm = 0; /* true if in IDA $( $) construct */ --- 560,566 ---- char *cp1; register int open = 0; register int conditional = 0; /* true if in an ifset condition */ ! /* register int quoting = 0; /* true if in a string */ register int needconcat = 0; /* true if an $? on line (lookahead) */ register int didconcat = 0; /* true if did the concat() */ register int indbm = 0; /* true if in IDA $( $) construct */ *************** *** 538,543 **** --- 570,578 ---- printf ("\t\t"); + if (aix_os ) { /* handle spaces here */ + while (cp && *cp && ((*cp == ' ' ) || (*cp == '\t' ))) cp++; + } /* Need to handle this line */ /* R$+<@$=S> $:$1<@$2>$?R<$R>$. */ for(cp1=cp;*cp1;cp1++) { *************** *** 544,553 **** if (*cp1 == '$' && (cp1+1) && *(cp1+1)== '?') needconcat = 1; /* there is an ifset on this line */ } ! if (*cp == '$' && index ("#@:", cp[1]) != NULL) ; /* not the default */ ! else ! { printf ("retry ("); open++; } --- 579,595 ---- if (*cp1 == '$' && (cp1+1) && *(cp1+1)== '?') needconcat = 1; /* there is an ifset on this line */ } ! /* should handle $?X here - this was added for AIX */ ! if (*cp == '$' && cp[1] == '?' ) { ! ++cp; /* now points at '?' */ ! printf ("ifset (%s, ", macro (*++cp)); ! ++cp; /* point past letter */ ! conditional++; ! ifset++; ! quoting++; ! } else if (*cp == '$' && index ("#@:", cp[1]) != NULL) { ; /* not the default */ ! } else { printf ("retry ("); open++; } *************** *** 556,562 **** { switch (*cp) { case '$': ! if (quoting && ! ifset ) { quoting = 0; putchar ('"'); --- 598,604 ---- { switch (*cp) { case '$': ! if (quoting && ! ifset && ! didconcat ) { quoting = 0; putchar ('"'); *************** *** 601,616 **** break; case '?': if (didconcat) { ! printf ("\","); needconcat = 0; /* don't need this */ } printf ("ifset (%s, \"", macro (*++cp)); conditional++; ifset++; ! quoting++; break; case '|': ! if ( ! conditional) complain("right side of rule - found '$|' without '$?'"); if ( ifset) { printf("\", \""); } else { --- 643,662 ---- break; case '?': if (didconcat) { ! if ( quoting) { ! printf ("\""); ! quoting = 0; ! } ! printf (","); needconcat = 0; /* don't need this */ } printf ("ifset (%s, \"", macro (*++cp)); conditional++; ifset++; ! quoting++; break; case '|': ! if ( ! ifset) complain("right side of rule - found '$|' without '$?'"); if ( ifset) { printf("\", \""); } else { *************** *** 661,667 **** if (needconcat && cp+1 && cp+2 && ! ((*(cp+1) == '$') && (*(cp+2) == '?'))){ printf ("concat (\""); ! open++;didconcat++; } open++; } --- 707,714 ---- if (needconcat && cp+1 && cp+2 && ! ((*(cp+1) == '$') && (*(cp+2) == '?'))){ printf ("concat (\""); ! open++;didconcat++; /* here? */ ! quoting++; /* this doesn't work */ } open++; } *************** *** 699,704 **** --- 746,752 ---- printf ("$%c", *cp); break; default: + #ifdef REMOVE if (ifset ) { if (quoting) printf ("${%s}", macro (*cp)); *************** *** 705,720 **** else printf ("$%s", macro (*cp)); } else { /* not in ifset() */ if (quoting) printf ("${%s}", macro (*cp)); else printf ("$%s", macro (*cp)); } break; } break; /* not a character that starts with a $ */ default: ! if ( ifset && quoting ) { putchar(*cp); } else if (ifset && ! quoting) { if ( ispunct (*cp)) { --- 753,771 ---- else printf ("$%s", macro (*cp)); } else { /* not in ifset() */ + #endif /* REMOVE */ if (quoting) printf ("${%s}", macro (*cp)); else printf ("$%s", macro (*cp)); + #ifdef REMOVE } + #endif /* REMOVE */ break; } break; /* not a character that starts with a $ */ default: ! if ( quoting ) { putchar(*cp); } else if (ifset && ! quoting) { if ( ispunct (*cp)) { *************** *** 746,757 **** } } /* end of for */ out: ! if (quoting) ! putchar ('"'); while (open--) putchar (')'); printf (";\n"); ! if (conditional) die ("rhs - $? without $."); } /* parseresolve - parse this mailer/host/user mess */ --- 797,810 ---- } } /* end of for */ out: ! if (quoting) { ! quoting = 0; /* end quoting */ ! putchar ('"'); ! } while (open--) putchar (')'); printf (";\n"); ! if (ifset) die ("rhs - $? without $."); } /* parseresolve - parse this mailer/host/user mess */ *************** *** 758,768 **** parseresolve(cp) char *cp; { ! int quoting = 0; int open = 0; - - int ifset = 0; char *addrops; addrops = ".:;%@!=/[]?#^,<>$"; /* should be defined from input file */ printf ("resolve (mailer ("); /* this is a simple (idiotic) parser (hack) that scans the right hand side of a $# rule --- 811,821 ---- parseresolve(cp) char *cp; { ! /* int quoting = 0; */ int open = 0; char *addrops; addrops = ".:;%@!=/[]?#^,<>$"; /* should be defined from input file */ + parseall: printf ("resolve (mailer ("); /* this is a simple (idiotic) parser (hack) that scans the right hand side of a $# rule *************** *** 772,778 **** "$# mailer $: something with a $macro" or "$# $M $: user" or "$# $1 " (IDA sendmail ) ! Note that there may be special constructs in the host field, i.e. "$1", "[$2]", "$w", or "$K". --- 825,833 ---- "$# mailer $: something with a $macro" or "$# $M $: user" or "$# $1 " (IDA sendmail ) ! But I have seen ! "$?U$#....$|$#.....$. ! Note that there may be special constructs in the host field, i.e. "$1", "[$2]", "$w", or "$K". *************** *** 797,802 **** --- 852,858 ---- /* we may now be pointing to: $@ - the host name $: - the user + $# or a macro or nothing?! (*cp == 0); /* don't look at the '$' */ *************** *** 846,854 **** } /* print host name ($@host ) */ if (ifset) ! printf (" host ("); else printf ("),\n\t\t\t\thost ("); for (;cp && *cp;cp++) { if (*cp != '$') { putchar (*cp); --- 902,911 ---- } /* print host name ($@host ) */ if (ifset) ! printf ("), host ("); else printf ("),\n\t\t\t\thost ("); + parsehost2: for (;cp && *cp;cp++) { if (*cp != '$') { putchar (*cp); *************** *** 858,863 **** --- 915,928 ---- if ( *(cp+1) == ':') { cp++; /* parseuser expects ':' */ goto parseuser; + } else if ( *(cp+1) == ']') { + printf (")"); + cp++;cp++; + goto parsehost2; + } else if ( *(cp+1) == '[') { + printf (" canon ("); + cp++;cp++; + goto parsehost2; } else { putchar(*cp++); /* print '$' */ printf("%s", macro(*cp)); /* and next */ *************** *** 873,879 **** fprintf(stderr, "Expected ':', found '%c' after '$' on line %d\n",*cp,line); /* looking at the user string */ ! quoting = 0; for (cp++; cp && *cp; cp++) { if (quoting ) { /* if (isalnum(*cp) || isspace(*cp)) { */ --- 938,944 ---- fprintf(stderr, "Expected ':', found '%c' after '$' on line %d\n",*cp,line); /* looking at the user string */ ! quoting = 0; for (cp++; cp && *cp; cp++) { if (quoting ) { /* if (isalnum(*cp) || isspace(*cp)) { */ *************** *** 915,941 **** } else if ( *cp == '|') { /* This is the middle of an ifset */ if ( ! ifset ) { ! fprintf(stderr, ! "Found a '$|' in the user address without a '$?' on line %d\n", ! *cp,line); cp++; /* ignore */ } else { /* I expected this */ - - printf(")),\n\t\t\t\t("); cp++; ! goto parsehost; } } else if ( *cp == '.') { /* This is the END of an ifset */ if ( ! ifset ) { ! fprintf(stderr, ! "Found a '$.' in the user address without a '$?' on line %d\n", ! *cp,line); cp++; /* ignore */ } else { /* I expected this */ /* cp++; */ /* Don't do this, the for loop increments cp */ ! printf("))"); ifset = 0; } } else { putchar ('$'); /* print $ */ printf("%s",macro(*cp)); /* and macro */ --- 980,1011 ---- } else if ( *cp == '|') { /* This is the middle of an ifset */ if ( ! ifset ) { ! complain("Found a '$|' in the user address without a '$?'"); cp++; /* ignore */ } else { /* I expected this */ cp++; ! if (*cp == '$' && *(cp+1) == '#' ) { ! printf(")),\n\t\t\t\t"); ! cp++; ! goto parseall; ! } else { ! printf(")),\n\t\t\t\t("); ! goto parsehost; ! } } } else if ( *cp == '.') { /* This is the END of an ifset */ if ( ! ifset ) { ! complain("Found a '$.' in the user address without a '$?'"); cp++; /* ignore */ } else { /* I expected this */ /* cp++; */ /* Don't do this, the for loop increments cp */ ! printf(")"); ifset = 0; } + } else if ( *cp == '#') { + cp++; + goto parsehost; } else { putchar ('$'); /* print $ */ printf("%s",macro(*cp)); /* and macro */ *************** *** 950,961 **** } } /* end of quoting/not quoting */ } ! if (quoting) printf("\""); out: if (ifset) { ! fprintf(stderr, ! "EOL while expecting '$.' on line %d\n", ! line); ifset = 0; } while (open--) printf(")"); --- 1020,1033 ---- } } /* end of quoting/not quoting */ } ! if (quoting) { ! quoting = 0; ! printf("\""); ! } out: if (ifset) { ! complain("EOL while expecting '$.' (adding missing piece)"); ! printf (")"); ifset = 0; } while (open--) printf(")"); *************** *** 1033,1039 **** } break; case '|': ! if ( ! conditional) die("def - $| without $?"); if ( ifset) { printf("\", \""); } else { --- 1105,1111 ---- } break; case '|': ! if ( ! ifset) die("def - $| without $?"); if ( ifset) { printf("\", \""); } else { *************** *** 1096,1102 **** concat--; } printf (";\n"); ! if (conditional) die ("def - $? without $."); } --- 1168,1174 ---- concat--; } printf (";\n"); ! if (ifset) die ("def - $? without $."); } *************** *** 1289,1295 **** if (ngets (buffer) != NULL) { line++; ! if (buffer[0] == '\t') { cp = buffer; goto loop; --- 1361,1367 ---- if (ngets (buffer) != NULL) { line++; ! if (aix_os ? ((buffer[0] == ' ') || (buffer[0] == '\t')) : (buffer[0] == '\t')) { cp = buffer; goto loop; *************** *** 1392,1398 **** if (quote) { putchar('"');quote--; } ! if ( ! conditional) complain("header - $| without $?"); if ( ifset) { printf(", "); needcomma=0; } else { --- 1464,1470 ---- if (quote) { putchar('"');quote--; } ! if ( ! ifset) complain("header - $| without $?"); if ( ifset) { printf(", "); needcomma=0; } else { *************** *** 1464,1470 **** if (ngets (buffer) != NULL) { line++; ! if (buffer[0] == '\t') { if ( concat ) { printf("), ");needcomma=0; --- 1536,1542 ---- if (ngets (buffer) != NULL) { line++; ! if (aix_os ? ((buffer[0] == ' ') || (buffer[0] == '\t')) : (buffer[0] == '\t')) { if ( concat ) { printf("), ");needcomma=0; *************** *** 1501,1507 **** if (flags) printf ("\t};\n"); ! if (conditional) die ("header translation problem: $? without $."); } --- 1573,1579 ---- if (flags) printf ("\t};\n"); ! if (ifset) die ("header translation problem: $? without $."); } *** ../3.5/Makefile Tue Nov 26 16:41:35 1991 --- Makefile Fri May 15 16:51:33 1992 *************** *** 1,6 **** ! # $Header: /home/kreskin/u0/barnett/Src/Ease/ease/RCS/Makefile,v 3.4 1991/10/15 17:37:27 barnett Exp $ # # $Log: Makefile,v $ # Revision 3.4 1991/10/15 17:37:27 barnett # Changed 'make shar' # --- 1,9 ---- ! # $Header: /home/alydar/u0/barnett/Src/Ease/ease/RCS/Makefile,v 3.5 1992/05/15 20:45:59 barnett Exp $ # # $Log: Makefile,v $ + # Revision 3.5 1992/05/15 20:45:59 barnett + # Added A/IX support + # # Revision 3.4 1991/10/15 17:37:27 barnett # Changed 'make shar' # *************** *** 32,37 **** --- 35,46 ---- #CONVERT_FLAGS=-i #SunOS Subsidiary CONVERT_FLAGS=-s -CV + #ultrix + #CONVERT_FLAGS=-d -C SDIZFN + #hp/ux + #CONVERT_FLAGS= -i + #A/IX + #CONVERT_FLAGS=-a -C FGEHV #what extenstion do you want for the manual pages? #EXT=1 *** ../3.5/doc/cfc.man Tue Nov 26 16:41:37 1991 --- doc/cfc.man Fri May 15 16:51:51 1992 *************** *** 1,7 **** ... ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/cfc.man,v 3.3 1991/09/09 16:36:05 barnett Exp $ ... ... $Log: cfc.man,v $ ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... --- 1,10 ---- ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cfc.man,v 3.4 1992/03/26 17:59:46 barnett Exp $ ... ... $Log: cfc.man,v $ + ... Revision 3.4 1992/03/26 17:59:46 barnett + ... Corrections by Arnold Robbins + ... ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... *************** *** 127,134 **** Move some comments. The block close on rulesets often comes after the comments that precede the next ruleset or mailer specification. - - - - .RE .P In short, .I cfc --- 130,135 ---- *** ../3.5/doc/ap1 Tue Nov 26 16:41:38 1991 --- doc/ap1 Fri May 15 16:51:40 1992 *************** *** 42,44 **** --- 42,45 ---- * Taken from pages 19 and 20 of the Sendmail Installation and Operation Guide (SMM:7 in the 4.3 BSD UNIX System Manager's Manual), by Eric Allman. .FE + .bp *** ../3.5/doc/ap2 Tue Nov 26 16:41:39 1991 --- doc/ap2 Fri May 15 16:51:40 1992 *************** *** 1,7 **** ... ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/ap2,v 3.3 1991/09/09 16:36:05 barnett Exp $ ... ... $Log: ap2,v $ ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... --- 1,10 ---- ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ap2,v 3.4 1992/03/26 17:59:46 barnett Exp $ ... ... $Log: ap2,v $ + ... Revision 3.4 1992/03/26 17:59:46 barnett + ... Corrections by Arnold Robbins + ... ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... *************** *** 40,46 **** .sp .TS center box; ! c|c l|l. Sendmail Option (\fBEase\fR) Sendmail Option (Raw) Special Values = --- 43,49 ---- .sp .TS center box; ! c|c|c l|l. Sendmail Option (\fBEase\fR) Sendmail Option (Raw) Special Values = *************** *** 93,101 **** \fIo_remote\fR R (SunOS) \fIo_aliasfile\fR Y (SunOS) \fIo_envelope\fR / (IDA) - - - - - - .TE .PP * This option is undocumented and unimplemented in 4.3BSD. It is --- 96,101 ---- *************** *** 110,112 **** --- 110,113 ---- \(bu This option is undocumented in 4.3BSD. It specifies the address of a Postmaster who should be carbon-copied on all returned bad mail. + .bp *** ../3.5/doc/ap3 Tue Nov 26 16:41:40 1991 --- doc/ap3 Fri May 15 16:51:41 1992 *************** *** 1,11 **** ... ! ... $Header: /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v 2.1 90/01/30 12:57:45 jeff Exp $ ... ! ... $Log: /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v $ ! ... Version 2.1 90/01/30 12:57:45 jeff ... Made changes corresponding to Ease release 2.1Alpha. ... se. ! ... ... Version 2.0 90/01/30 12:50:38 jeff ... Baseline version, corresponding to netwide release 2.0. ... --- 1,14 ---- ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ap3,v 2.2 1992/03/26 17:59:46 barnett Exp $ ... ! ... $Log: ap3,v $ ! ... Revision 2.2 1992/03/26 17:59:46 barnett ! ... Corrections by Arnold Robbins ! ... ! ... Revision 2.1 1990/01/30 12:57:45 jeff ... Made changes corresponding to Ease release 2.1Alpha. ... se. ! ... ... Version 2.0 90/01/30 12:50:38 jeff ... Baseline version, corresponding to netwide release 2.0. ... *************** *** 37,43 **** .TS center box; c|c ! l|l. Mailer Flag (\fBEase\fR) Mailer Flag (Raw) = \fIf_ffrom\fR f --- 40,46 ---- .TS center box; c|c ! l|l|l. Mailer Flag (\fBEase\fR) Mailer Flag (Raw) = \fIf_ffrom\fR f *************** *** 72,74 **** --- 75,78 ---- both undocumented and unimplemented. \fBEase\fR supports it in anticipation of future developments. .FE + .bp *** ../3.5/doc/cover Tue Nov 26 16:41:40 1991 --- doc/cover Fri May 15 16:51:42 1992 *************** *** 1,7 **** ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 3.4 1991/11/25 18:17:56 barnett Exp $ ... ... $Log: cover,v $ ... Revision 3.4 1991/11/25 18:17:56 barnett ... added .bp at EOF ... --- 1,10 ---- ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 3.5 1992/03/26 17:59:46 barnett Exp $ ... ... $Log: cover,v $ + ... Revision 3.5 1992/03/26 17:59:46 barnett + ... Corrections by Arnold Robbins + ... ... Revision 3.4 1991/11/25 18:17:56 barnett ... added .bp at EOF ... *************** *** 61,63 **** --- 64,68 ---- \fICorporate Research and Development\fR .DE .bp + .ps + .nr PS 10 *** ../3.5/doc/ease.paper Tue Nov 26 16:41:43 1991 --- doc/ease.paper Fri May 15 16:52:01 1992 *************** *** 1,7 **** ... ! ... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/ease.paper,v 3.3 1991/09/09 16:36:05 barnett Exp $ ... ... $Log: ease.paper,v $ ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... --- 1,10 ---- ... ! ... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/ease.paper,v 3.4 1992/03/26 17:59:46 barnett Exp $ ... ... $Log: ease.paper,v $ + ... Revision 3.4 1992/03/26 17:59:46 barnett + ... Corrections by Arnold Robbins + ... ... Revision 3.3 1991/09/09 16:36:05 barnett ... minor bug fixes ... *************** *** 833,843 **** the \fBconditional-expression\fR evaluates to the string "New Jersey". .NH 2 Latest Changes The first two releases of \fBEase\fP provided a good starting point for managing \fIsendmail\fP files. However, the translation wasn't ! perfect. Some editing needed to be done before \fBEase\fB could be used. ! Bruce G. Barnett made modifications to Arnold Robbin's \fBEase\fP to sendmail convertor \fIcfc\fP and tested these changes to verify a \fIsendmail\fP configuration fle could be translated into \fBEase\fP and back with no errors: at least for the more common versions of --- 836,847 ---- the \fBconditional-expression\fR evaluates to the string "New Jersey". .NH 2 Latest Changes + .PP The first two releases of \fBEase\fP provided a good starting point for managing \fIsendmail\fP files. However, the translation wasn't ! perfect. Some editing needed to be done before \fBEase\fP could be used. ! Bruce G. Barnett made modifications to Arnold Robbins' \fBEase\fP to sendmail convertor \fIcfc\fP and tested these changes to verify a \fIsendmail\fP configuration fle could be translated into \fBEase\fP and back with no errors: at least for the more common versions of *************** *** 906,911 **** .PP The most up to date version of \fBEase\fR should be gotten from the nearest USENET \fBcomp.sources.unix\fR archive site. ! # Local variables: ! # mode: nroff ! # end: --- 910,916 ---- .PP The most up to date version of \fBEase\fR should be gotten from the nearest USENET \fBcomp.sources.unix\fR archive site. ! .bp ! ... Local variables: ! ... mode: nroff ! ... end: *** ../3.5/TODO Tue Nov 26 16:41:44 1991 --- TODO Fri May 15 16:51:36 1992 *************** *** 2,7 **** --- 2,12 ---- ------------------------- + Handle the following: + + R$+<@$=S> $?S $#ether $@$S $:$2!$1 $| $#dni $@$2 $:$1 $. + R$+<@$=S.uucp> $?S $#ether $@$S $:$2!$1 $| $#dni $@$2 $:$1 $. + Fix the following constructs so that cfc/et handles the conversion properly: # indirect macros, i.e. *** ../3.5/src/Makefile Tue Nov 26 16:41:45 1991 --- src/Makefile Fri May 15 16:51:51 1992 *************** *** 1,8 **** # Makefile for Ease Translator (et). # ! # $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.3 1991/09/09 16:33:23 barnett Exp $ # # $Log: Makefile,v $ # Revision 3.3 1991/09/09 16:33:23 barnett # Minor bug fix release # --- 1,11 ---- # Makefile for Ease Translator (et). # ! # $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/Makefile,v 3.4 1992/05/15 20:44:39 barnett Exp $ # # $Log: Makefile,v $ + # Revision 3.4 1992/05/15 20:44:39 barnett + # Added A/IX support + # # Revision 3.3 1991/09/09 16:33:23 barnett # Minor bug fix release # *************** *** 44,58 **** # - A esix SysV PC with gcc # - A HP9000/845 with cc # - Apollo/Domain with BSD4.3 environment ! # The default is to define it, because this is what earlier versions ! # of Ease did. # # SYSV # If you have a system V machine, and have # instead of , then define this # #OFLAGS=-DSYSV - - OFLAGS=-DDATA_RW DEFS = ${OFLAGS} LIBS = -ll --- 47,60 ---- # - A esix SysV PC with gcc # - A HP9000/845 with cc # - Apollo/Domain with BSD4.3 environment ! # The default is to not define it, earlier versions did define it # + #OFLAGS=-DDATA_RW # SYSV # If you have a system V machine, and have # instead of , then define this # #OFLAGS=-DSYSV DEFS = ${OFLAGS} LIBS = -ll *************** *** 77,83 **** # The following two lines are used with the SunOS malloc() debug package. #DEFS = -DMALLOC_DEBUG # Part of the SunOS malloc package #LIBS = /usr/lib/debug/malloc.o -ll ! CFLAGS = -g ${DEFS} ${INCLUDE} HDR = symtab.h --- 79,85 ---- # The following two lines are used with the SunOS malloc() debug package. #DEFS = -DMALLOC_DEBUG # Part of the SunOS malloc package #LIBS = /usr/lib/debug/malloc.o -ll ! #CFLAGS = -g ${DEFS} ${INCLUDE} HDR = symtab.h *** ../3.5/src/parser.y Tue Nov 26 16:41:46 1991 --- src/parser.y Fri May 15 16:51:59 1992 *************** *** 1,7 **** %{ #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.4 1991/10/15 17:02:04 barnett Exp $"; # endif LINT #endif FLUKE --- 1,7 ---- %{ #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/parser.y,v 3.5 1992/05/15 20:44:39 barnett Exp $"; # endif LINT #endif FLUKE *************** *** 22,27 **** --- 22,30 ---- * All rights reserved. * * $Log: parser.y,v $ + * Revision 3.5 1992/05/15 20:44:39 barnett + * Added A/IX support + * * Revision 3.4 1991/10/15 17:02:04 barnett * Detect if (one_or_more) next ($2) error * *************** *** 221,230 **** %type optid %type flagid %type mvar ! %type ifresmatch elseresmatch ifresroute elseresroute /* needed special class with no comma's allowed */ %type anycharbutcomma %type matchaddrnocomma matchtoknocomma %left COMMA %left LPAREN RPAREN --- 224,234 ---- %type optid %type flagid %type mvar ! %type ifresmatch /* elseresmatch */ ifresroute elseresroute /* needed special class with no comma's allowed */ %type anycharbutcomma %type matchaddrnocomma matchtoknocomma + %type ifresolution %left COMMA %left LPAREN RPAREN *************** *** 854,871 **** ; /* just like matchaddr - but comma's aren't allowed */ ! matchaddrnocomma : /* empty */ { ! $$ = NULL; ! } ! | matchaddrnocomma matchtoknocomma { $$ = ListAppend ($1, $2, (char *) NULL); Free ($1); /* NULL */ } | error { $$ = NULL; } ; matchtok : IDENT { $$ = GetField ($1); } --- 858,876 ---- ; /* just like matchaddr - but comma's aren't allowed */ ! matchaddrnocomma : matchaddrnocomma matchtoknocomma { $$ = ListAppend ($1, $2, (char *) NULL); Free ($1); /* NULL */ } + | matchtoknocomma { + $$ = $1; + } | error { $$ = NULL; } ; + /* matchtok is one of several pieces in the lhs of the rule */ matchtok : IDENT { $$ = GetField ($1); } *************** *** 925,953 **** } ; ! ifresmatch : matchaddrnocomma elseresmatch { ! if ($2 != NULL) { ! $$ = ListAppend ($1, $2, "$|"); Free ($1); ! Free ($2); } else $$ = $1; } ! | error { $$ = NULL; } ; ! elseresmatch : COMMA matchaddrnocomma { $$ = $2; } ! ; actionstmt : action LPAREN rwaddr RPAREN SEMI { $$ = ListAppend ($1, $3, (char *) NULL); Free ($3); } | RESOLVE LPAREN resolution RPAREN SEMI { $$ = $3; } --- 930,975 ---- } ; ! /* The object of an ifset(V, ..... ) ! * may or may not have a comma */ ! ifresmatch : matchaddrnocomma COMMA matchaddrnocomma { ! if ($3 != NULL) { ! $$ = ListAppend ($1, $3, "$|"); Free ($1); ! Free ($3); } else $$ = $1; } ! | COMMA matchaddrnocomma { ! if ($2 != NULL) { ! $$ = ListAppend ("$|", $2, (char *)NULL); ! Free ($2); ! } else ! $$ = $2; ! } ! | matchaddrnocomma { ! $$ = $1; ! } ! ! | /* empty */ { $$ = NULL; } + ; ! /*elseresmatch : COMMA matchaddrnocomma { $$ = $2; } ! ; */ actionstmt : action LPAREN rwaddr RPAREN SEMI { $$ = ListAppend ($1, $3, (char *) NULL); Free ($3); } + | IFSET LPAREN IDENT COMMA ifresolution RPAREN SEMI { + $$ = MakeCond ($3, MacScan($5)); + } | RESOLVE LPAREN resolution RPAREN SEMI { $$ = $3; } *************** *** 957,962 **** --- 979,992 ---- } ; + ifresolution : RESOLVE LPAREN resolution RPAREN { + $$ = $3; + } + | RESOLVE LPAREN resolution RPAREN COMMA RESOLVE LPAREN resolution RPAREN { + $$ = ListAppend ( $3, $8, "$|"); + Free ($3); + Free ($8); + } action : RETRY { $$ = NULL; } *** ../3.5/src/main.c Tue Nov 26 16:41:53 1991 --- src/main.c Fri May 15 16:51:57 1992 *************** *** 1,6 **** #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/main.c,v 3.2 1991/05/16 10:45:25 barnett Exp $"; # endif LINT #endif FLUKE --- 1,6 ---- #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/alydar/u0/barnett/Src/ease/src/RCS/main.c,v 3.2 1991/05/16 10:45:25 barnett Exp $"; # endif LINT #endif FLUKE *** ../3.5/src/strops.c Tue Nov 26 16:41:54 1991 --- src/strops.c Fri May 15 16:51:58 1992 *************** *** 1,6 **** #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/kreskin/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.4 1991/10/15 17:02:04 barnett Exp $"; # endif LINT #endif FLUKE --- 1,6 ---- #ifdef FLUKE # ifndef LINT ! static char RCSid[] = "@(#)FLUKE $Header: /home/alydar/u0/barnett/Src/Ease/ease/src/RCS/strops.c,v 3.5 1992/05/15 20:44:39 barnett Exp $"; # endif LINT #endif FLUKE *************** *** 18,23 **** --- 18,26 ---- * All rights reserved. * * $Log: strops.c,v $ + * Revision 3.5 1992/05/15 20:44:39 barnett + * Added A/IX support + * * Revision 3.4 1991/10/15 17:02:04 barnett * Detect if (one_or_more) next ($2) error * *************** *** 43,49 **** --- 46,58 ---- #include "fixstrings.h" #include + #ifdef SYSV + #include + #define index strchr + #define rindex strrchr + #else #include + #endif #include #include "symtab.h" *** ../3.5/utils/cfstrip.sh Tue Nov 26 16:41:58 1991 --- utils/cfstrip.sh Fri May 15 16:51:49 1992 *************** *** 18,23 **** --- 18,25 ---- exit 1 ;; esac + # Add this rule if using AIX's sendmail file deliniated by a space + #/^R/ s/ */ /g sed -e ' s/^#.*// s/^\(R[^ ]*[ ][ ]*[^ ]*\)[ ]*.*$/\1/ *** ../3.5/CONVERTING Tue Nov 26 16:42:07 1991 --- CONVERTING Fri May 15 16:51:50 1992 *************** *** 44,49 **** --- 44,74 ---- => cfc -C DUET + aix + This is complicated. AIX supports sendmail.cf files + deliniated by spaces in addition to tabs. cfc can handle this, + but if you want to compare the original .cf with the output of + ease, you have to modify cfstrip: + Add the sed rule + /^R/ s/ */ /g + after + s/^#.*// + This will change two or more spaces into a tab + + There is a new flag for AIX = -a + Use the following for converting an AIX sendmail file + cfc -a -C FGEHV + + You will get two strange warnings: + + Warning: malformed input line 943: EOL while expecting '$.' (adding missing piece) + Warning: malformed input line 944: EOL while expecting '$.' (adding missing piece) + + These are caused by a rle that has a $? but doesn't have the $. + at the end. cfc fixes this problem. It also measn there will be + a difference between the original sendmail and the one ease + generates as output because cfc fixes the error. + Step 2. Convert the ease file to cf: % et sendmail.cf