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