5 /* match_parent_style 3
7 /* parent domain matching control
9 /* #include <match_parent_style.h>
11 /* int match_parent_style(name)
14 /* This module queries configuration parameters for the policy that
15 /* controls how wild-card parent domain names are used by various
16 /* postfix lookup mechanisms.
18 /* match_parent_style() looks up "name" in the
19 /* parent_domain_matches_subdomain configuration parameter
20 /* and returns either MATCH_FLAG_PARENT (parent domain matches
21 /* subdomains) or MATCH_FLAG_NONE.
23 /* Fatal error: out of memory, name listed under both parent wild card
26 /* string_list(3) plain string matching
27 /* domain_list(3) match host name patterns
28 /* namadr_list(3) match host name/address patterns
32 /* The Secure Mailer license must be distributed with this software.
35 /* IBM T.J. Watson Research
37 /* Yorktown Heights, NY 10598, USA
44 /* Utility library. */
48 #include <string_list.h>
49 #include <mail_params.h>
50 #include <match_parent_style.h>
52 /* Application-specific. */
54 static STRING_LIST
*match_par_dom_list
;
56 int match_parent_style(const char *name
)
61 * Initialize on the fly.
63 if (match_par_dom_list
== 0)
65 string_list_init(MATCH_FLAG_NONE
, var_par_dom_match
);
68 * Look up the parent domain matching policy.
70 if (string_list_match(match_par_dom_list
, name
))
71 result
= MATCH_FLAG_PARENT
;