X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/b8761f4395e36f908a3504ba0388bae55bd8770e..42fa5d672c8eff8b002fc5bb3909a8e850c1d456:/usr/src/usr.sbin/sendmail/src/sendmail.h diff --git a/usr/src/usr.sbin/sendmail/src/sendmail.h b/usr/src/usr.sbin/sendmail/src/sendmail.h index feec3672e3..88a3f2b66f 100644 --- a/usr/src/usr.sbin/sendmail/src/sendmail.h +++ b/usr/src/usr.sbin/sendmail/src/sendmail.h @@ -5,7 +5,7 @@ * * %sccs.include.redist.c% * - * @(#)sendmail.h 5.30.1.1 (Berkeley) %G% + * @(#)sendmail.h 5.31 (Berkeley) %G% */ /* @@ -15,7 +15,7 @@ # ifdef _DEFINE # define EXTERN # ifndef lint -static char SmailSccsId[] = "@(#)sendmail.h 5.30.1.1 %G%"; +static char SmailSccsId[] = "@(#)sendmail.h 5.31 %G%"; # endif lint # else _DEFINE # define EXTERN extern @@ -345,6 +345,10 @@ EXTERN struct rewrite *RewriteRules[MAXRWSETS]; # define HOSTBEGIN '\035' /* hostname lookup begin */ # define HOSTEND '\036' /* hostname lookup end */ +/* bracket characters for generalized lookup */ +# define LOOKUPBEGIN '\005' /* generalized lookup begin */ +# define LOOKUPEND '\006' /* generalized lookup end */ + /* \001 is also reserved as the macro expansion character */ /* external <==> internal mapping table */ @@ -375,6 +379,42 @@ MCONINFO /* flag bits */ #define MCIF_VALID 00001 /* this entry is valid */ /* +** Mapping functions +** +** These allow arbitrary mappings in the config file. The idea +** (albeit not the implementation) comes from IDA sendmail. +*/ + + +/* +** The class of a map -- essentially the functions to call +*/ + +# define MAPCLASS struct _mapclass + +MAPCLASS +{ + bool (*map_init)(); /* initialization function */ + char *(*map_lookup)(); /* lookup function */ +}; + + +/* +** An actual map. +*/ + +# define MAP struct _map + +MAP +{ + MAPCLASS *map_class; /* the class of this map */ + int map_flags; /* flags, see below */ + char *map_file; /* the (nominal) filename */ +}; + +/* bit values for map_flags */ +# define MF_VALID 00001 /* this entry is valid */ + /* ** Symbol table definitions */ @@ -389,6 +429,8 @@ struct symtab ADDRESS *sv_addr; /* pointer to address header */ MAILER *sv_mailer; /* pointer to mailer */ char *sv_alias; /* alias */ + MAPCLASS sv_mapclass; /* mapping function class */ + MAP sv_map; /* mapping function */ MCONINFO sv_mci; /* mailer connection info */ } s_value; };