SCCS-mr: usr.sbin/sendmail/src/main.c 095
SCCS-mr: usr.sbin/sendmail/src/sendmail.h 095
SCCS-mr: usr.sbin/sendmail/src/parseaddr.c 095
SCCS-vsn: usr.sbin/sendmail/src/main.c 3.144
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 3.104
SCCS-vsn: usr.sbin/sendmail/src/parseaddr.c 3.68
# include <sys/ioctl.h>
# include "sendmail.h"
# include <sys/ioctl.h>
# include "sendmail.h"
-SCCSID(@(#)main.c 3.143 %G%);
+SCCSID(@(#)main.c 3.144 %G%);
/*
** SENDMAIL -- Post mail to a set of destinations.
/*
** SENDMAIL -- Post mail to a set of destinations.
{
/* these are important on the LHS */
'*', MATCHZANY, '+', MATCHANY, '-', MATCHONE, '=', MATCHCLASS,
{
/* these are important on the LHS */
'*', MATCHZANY, '+', MATCHANY, '-', MATCHONE, '=', MATCHCLASS,
/* these are RHS metasymbols */
'#', CANONNET, '@', CANONHOST, ':', CANONUSER, '>', CALLSUBR,
/* these are RHS metasymbols */
'#', CANONNET, '@', CANONHOST, ':', CANONUSER, '>', CALLSUBR,
-SCCSID(@(#)parseaddr.c 3.67 %G%);
+SCCSID(@(#)parseaddr.c 3.68 %G%);
/*
** PARSE -- Parse an address
/*
** PARSE -- Parse an address
expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
(void) strcat(buf, DELIMCHARS);
}
expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
(void) strcat(buf, DELIMCHARS);
}
- if (c == MATCHCLASS || c == MATCHREPL)
+ if (c == MATCHCLASS || c == MATCHREPL || c == MATCHNCLASS)
return (ONE);
if (c == '"')
return (QST);
return (ONE);
if (c == '"')
return (QST);
** For each rewrite rule, 'avp' points the address vector we
** are trying to match against, and 'pvp' points to the pattern.
** If pvp points to a special match value (MATCHZANY, MATCHANY,
** For each rewrite rule, 'avp' points the address vector we
** are trying to match against, and 'pvp' points to the pattern.
** If pvp points to a special match value (MATCHZANY, MATCHANY,
-** MATCHONE, MATCHCLASS) then the address in avp matched is
-** saved away in the match vector (pointed to by 'mvp').
+** MATCHONE, MATCHCLASS, MATCHNCLASS) then the address in avp
+** matched is saved away in the match vector (pointed to by 'mvp').
**
** When a match between avp & pvp does not match, we try to
**
** When a match between avp & pvp does not match, we try to
-** back out. If we back up over a MATCHONE or a MATCHCLASS
+** back out. If we back up over MATCHONE, MATCHCLASS, or MATCHNCLASS
** we must also back out the match in mvp. If we reach a
** MATCHANY or MATCHZANY we just extend the match and start
** over again.
** we must also back out the match in mvp. If we reach a
** MATCHANY or MATCHZANY we just extend the match and start
** over again.
register int class;
case MATCHCLASS:
register int class;
case MATCHCLASS:
- /* match any token in a class */
+ case MATCHNCLASS:
+ /* match any token in (not in) a class */
class = rp[1];
if (!isalpha(class))
goto backup;
class = rp[1];
if (!isalpha(class))
goto backup;
class -= 'a';
s = stab(ap, ST_CLASS, ST_FIND);
if (s == NULL || (s->s_class & (1L << class)) == 0)
class -= 'a';
s = stab(ap, ST_CLASS, ST_FIND);
if (s == NULL || (s->s_class & (1L << class)) == 0)
+ {
+ if (*rp == MATCHCLASS)
+ goto backup;
+ }
+ else if (*rp == MATCHNCLASS)
goto backup;
/* explicit fall-through */
goto backup;
/* explicit fall-through */
- if (*rp == MATCHONE || *rp == MATCHCLASS)
+ if (*rp == MATCHONE || *rp == MATCHCLASS ||
+ *rp == MATCHNCLASS)
{
/* back out binding */
mlp--;
{
/* back out binding */
mlp--;
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 3.103 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 3.104 %G%";
# endif lint
# else _DEFINE
# define EXTERN extern
# endif lint
# else _DEFINE
# define EXTERN extern
# define MATCHANY '\021' /* match one or more tokens */
# define MATCHONE '\022' /* match exactly one token */
# define MATCHCLASS '\023' /* match one token in a class */
# define MATCHANY '\021' /* match one or more tokens */
# define MATCHONE '\022' /* match exactly one token */
# define MATCHCLASS '\023' /* match one token in a class */
+# define MATCHNCLASS '\034' /* match anything not in class */
# define MATCHREPL '\024' /* replacement on RHS for above */
/* right hand side items */
# define MATCHREPL '\024' /* replacement on RHS for above */
/* right hand side items */