Home | History | Annotate | Line # | Download | only in global
      1 /*	$NetBSD: ext_prop.c,v 1.2 2017/02/14 01:16:45 christos Exp $	*/
      2 
      3 /*++
      4 /* NAME
      5 /*	ext_prop 3
      6 /* SUMMARY
      7 /*	address extension propagation control
      8 /* SYNOPSIS
      9 /*	#include <ext_prop.h>
     10 /*
     11 /*	int	ext_prop_mask(param_name, pattern)
     12 /*	const char *param_name;
     13 /*	const char *pattern;
     14 /* DESCRIPTION
     15 /*	This module controls address extension propagation.
     16 /*
     17 /*	ext_prop_mask() takes a comma-separated list of names and
     18 /*	computes the corresponding mask. The following names are
     19 /*	recognized in \fBpattern\fR, with the corresponding bit mask
     20 /*	given in parentheses:
     21 /* .IP "canonical (EXT_PROP_CANONICAL)"
     22 /*	Propagate unmatched address extensions to the right-hand side
     23 /*	of canonical table entries (not: regular expressions).
     24 /* .IP "virtual (EXT_PROP_VIRTUAL)"
     25 /*	Propagate unmatched address extensions to the right-hand side
     26 /*	of virtual table entries (not: regular expressions).
     27 /* .IP "alias (EXT_PROP_ALIAS)"
     28 /*	Propagate unmatched address extensions to the right-hand side
     29 /*	of alias database entries.
     30 /* .IP "forward (EXT_PROP_FORWARD)"
     31 /*	Propagate unmatched address extensions to the right-hand side
     32 /*	of .forward file entries.
     33 /* .IP "include (EXT_PROP_INCLUDE)"
     34 /*	Propagate unmatched address extensions to the right-hand side
     35 /*	of :include: file entries.
     36 /* .IP "generic (EXT_PROP_GENERIC)"
     37 /*	Propagate unmatched address extensions to the right-hand side
     38 /*	of smtp_generic_maps entries.
     39 /* DIAGNOSTICS
     40 /*	Panic: inappropriate use.
     41 /* LICENSE
     42 /* .ad
     43 /* .fi
     44 /*	The Secure Mailer license must be distributed with this software.
     45 /* AUTHOR(S)
     46 /*	Wietse Venema
     47 /*	IBM T.J. Watson Research
     48 /*	P.O. Box 704
     49 /*	Yorktown Heights, NY 10598, USA
     50 /*--*/
     51 
     52 /* System library. */
     53 
     54 #include <sys_defs.h>
     55 
     56 /* Utility library. */
     57 
     58 #include <name_mask.h>
     59 
     60 /* Global library. */
     61 
     62 #include <mail_params.h>
     63 #include <ext_prop.h>
     64 
     65 /* ext_prop_mask - compute extension propagation mask */
     66 
     67 int     ext_prop_mask(const char *param_name, const char *pattern)
     68 {
     69     static const NAME_MASK table[] = {
     70 	"canonical", EXT_PROP_CANONICAL,
     71 	"virtual", EXT_PROP_VIRTUAL,
     72 	"alias", EXT_PROP_ALIAS,
     73 	"forward", EXT_PROP_FORWARD,
     74 	"include", EXT_PROP_INCLUDE,
     75 	"generic", EXT_PROP_GENERIC,
     76 	0,
     77     };
     78 
     79     return (name_mask(param_name, table, pattern));
     80 }
     81