Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
match_parent_style.c
[詳解]
1
/*++
2
/* NAME
3
/* match_parent_style 3
4
/* SUMMARY
5
/* parent domain matching control
6
/* SYNOPSIS
7
/* #include <match_parent_style.h>
8
/*
9
/* int match_parent_style(name)
10
/* const char *name;
11
/* DESCRIPTION
12
/* This module queries configuration parameters for the policy that
13
/* controls how wild-card parent domain names are used by various
14
/* postfix lookup mechanisms.
15
/*
16
/* match_parent_style() looks up "name" in the
17
/* parent_domain_matches_subdomain configuration parameter
18
/* and returns either MATCH_FLAG_PARENT (parent domain matches
19
/* subdomains) or MATCH_FLAG_NONE.
20
/* DIAGNOSTICS
21
/* Fatal error: out of memory, name listed under both parent wild card
22
/* matching policies.
23
/* SEE ALSO
24
/* string_list(3) plain string matching
25
/* domain_list(3) match host name patterns
26
/* namadr_list(3) match host name/address patterns
27
/* LICENSE
28
/* .ad
29
/* .fi
30
/* The Secure Mailer license must be distributed with this software.
31
/* AUTHOR(S)
32
/* Wietse Venema
33
/* IBM T.J. Watson Research
34
/* P.O. Box 704
35
/* Yorktown Heights, NY 10598, USA
36
/*--*/
37
38
/* System library. */
39
40
#include <
sys_defs.h
>
41
42
/* Utility library. */
43
44
/* Global library. */
45
46
#include <
string_list.h
>
47
#include <
mail_params.h
>
48
#include <
match_parent_style.h
>
49
50
/* Application-specific. */
51
52
static
STRING_LIST
*match_par_dom_list;
53
54
int
match_parent_style
(
const
char
*name)
55
{
56
int
result;
57
58
/*
59
* Initialize on the fly.
60
*/
61
if
(match_par_dom_list == 0)
62
match_par_dom_list =
63
string_list_init
(
VAR_PAR_DOM_MATCH
,
MATCH_FLAG_NONE
,
64
var_par_dom_match
);
65
66
/*
67
* Look up the parent domain matching policy.
68
*/
69
if
(
string_list_match
(match_par_dom_list, name))
70
result =
MATCH_FLAG_PARENT
;
71
else
72
result = 0;
73
return
(result);
74
}
match_parent_style
int match_parent_style(const char *name)
Definition:
match_parent_style.c:54
STRING_LIST
#define STRING_LIST
Definition:
string_list.h:22
match_parent_style.h
string_list_init
#define string_list_init(o, f, p)
Definition:
string_list.h:24
string_list_match
#define string_list_match
Definition:
string_list.h:26
MATCH_FLAG_PARENT
#define MATCH_FLAG_PARENT
Definition:
match_list.h:39
sys_defs.h
string_list.h
VAR_PAR_DOM_MATCH
#define VAR_PAR_DOM_MATCH
Definition:
mail_params.h:2638
mail_params.h
var_par_dom_match
char * var_par_dom_match
Definition:
mail_params.c:292
MATCH_FLAG_NONE
#define MATCH_FLAG_NONE
Definition:
match_list.h:38
2018年11月10日(土) 18時59分38秒作成 - Postfix3.3.1 / 構成:
1.8.9.1