mirror of
https://github.com/vdukhovni/postfix
synced 2025-09-02 07:05:27 +00:00
postfix-2.9-20111129
This commit is contained in:
committed by
Viktor Dukhovni
parent
5854f6cb45
commit
a2556d5b9d
@@ -17177,4 +17177,14 @@ Apologies for any names omitted.
|
||||
|
||||
Cleanup: added the pipe(8) delivery agent to the list of
|
||||
programs that implement transport_time_limit parameters.
|
||||
File: postconf/postconf_service.c, postconf/test6.ref.
|
||||
File: postconf/postconf_service.c, postconf/test6.ref,
|
||||
postconf/test22.ref.
|
||||
|
||||
20111128
|
||||
|
||||
Feature: "postconf -C class,..." support to print parameters
|
||||
in one or more classes (builtin= built-in parameter names,
|
||||
service=service-defined parameter names, user=user-defined
|
||||
parameter names). Files: postconf/postconf.c, postconf/postconf.h,
|
||||
postconf_service.c, postconf/postconf_user.c.
|
||||
|
||||
|
@@ -207,11 +207,11 @@ NOTES:
|
||||
* Lines 8, 9: always specify "check_policy_service" AFTER
|
||||
"reject_unauth_destination" or else your system could become an open relay.
|
||||
|
||||
* Line 11: this increases the time that a policy server process is allowed to
|
||||
run from the default 1000 seconds to 3600 seconds. The default time limit
|
||||
is too short for a policy daemon that needs to run long as the SMTP server
|
||||
process that talks to it. See the spawn(8) manpage for more information
|
||||
about the transport_time_limit parameter.
|
||||
* Line 11: this increases the time that a policy server process may run to
|
||||
3600 seconds. The default time limit of 1000 seconds is too short; the
|
||||
policy daemon needs to run long as the SMTP server process that talks to
|
||||
it. See the spawn(8) manpage for more information about the
|
||||
transport_time_limit parameter.
|
||||
|
||||
Note: the "policy_time_limit" parameter will not show up in "postconf"
|
||||
command output before Postfix version 2.9. This limitation applies to
|
||||
@@ -315,11 +315,11 @@ Notes:
|
||||
* Line 3: Specify "greylist.pl -v" for verbose logging of each request and
|
||||
reply.
|
||||
|
||||
* Line 6: this increases the time that a greylist server process is allowed
|
||||
to run from the default 1000 seconds to 3600 seconds. The default time
|
||||
limit is too short for a greylist daemon that needs to run long as the SMTP
|
||||
server process that talks to it. See the spawn(8) manpage for more
|
||||
information about the transport_time_limit parameter.
|
||||
* Line 6: this increases the time that a greylist server process may run to
|
||||
3600 seconds. The default time limit of 1000 seconds is too short; the
|
||||
greylist daemon needs to run long as the SMTP server process that talks to
|
||||
it. See the spawn(8) manpage for more information about the
|
||||
transport_time_limit parameter.
|
||||
|
||||
Note: the "greylist_time_limit" parameter will not show up in
|
||||
"postconf" command output before Postfix version 2.9. This limitation
|
||||
|
@@ -2,6 +2,8 @@ Wish list:
|
||||
|
||||
Things to do before the stable release:
|
||||
|
||||
Add regression tests for postconf -C.
|
||||
|
||||
Remove this file from the stable release.
|
||||
|
||||
Things to do after the stable release:
|
||||
@@ -13,6 +15,9 @@ Wish list:
|
||||
that, it can discuss the gory details of higher security
|
||||
levels for the few people who need it.
|
||||
|
||||
make address_verify_sender dynamic so it won't work
|
||||
with address harvesters.
|
||||
|
||||
Investigate viability of memcached for applications
|
||||
that require performance for low-security operations
|
||||
such as sharing the postscreen cache.
|
||||
|
@@ -261,7 +261,7 @@ daemon, you would use something like this: </p>
|
||||
8 <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
|
||||
9 <a href="postconf.5.html#check_policy_service">check_policy_service</a> unix:private/policy
|
||||
10 ...
|
||||
11 policy_time_limit = 3600
|
||||
11 <a href="postconf.5.html#transport_time_limit">policy_time_limit</a> = 3600
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
@@ -284,13 +284,13 @@ increase the smtpd process limit. </p>
|
||||
open relay. </p>
|
||||
|
||||
<li> <p> Line 11: this increases the time that a policy server
|
||||
process is allowed to run from the default 1000 seconds to 3600
|
||||
seconds. The default time limit is too short for a policy daemon
|
||||
that needs to run long as the SMTP server process that talks to it.
|
||||
process may run to 3600 seconds. The default time limit of 1000
|
||||
seconds is too short; the policy daemon needs to run long as the
|
||||
SMTP server process that talks to it.
|
||||
See the <a href="spawn.8.html">spawn(8)</a> manpage for more information about the
|
||||
<a href="postconf.5.html#transport_time_limit"><i>transport</i>_time_limit</a> parameter. </p>
|
||||
|
||||
<blockquote> <p> Note: the "policy_time_limit" parameter will not
|
||||
<blockquote> <p> Note: the "<a href="postconf.5.html#transport_time_limit">policy_time_limit</a>" parameter will not
|
||||
show up in "postconf" command output before Postfix version 2.9.
|
||||
This limitation applies to many parameters whose name is a combination
|
||||
of a <a href="master.5.html">master.cf</a> service name (in the above example, "policy") and a
|
||||
@@ -401,7 +401,7 @@ processes only: </p>
|
||||
3 user=nobody argv=/usr/bin/perl /usr/libexec/postfix/greylist.pl
|
||||
4
|
||||
5 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
|
||||
6 greylist_time_limit = 3600
|
||||
6 <a href="postconf.5.html#transport_time_limit">greylist_time_limit</a> = 3600
|
||||
7 <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
|
||||
8 ...
|
||||
9 <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
|
||||
@@ -428,13 +428,13 @@ increase the smtpd process limit. </p>
|
||||
each request and reply. </p>
|
||||
|
||||
<li> <p> Line 6: this increases the time that a greylist server
|
||||
process is allowed to run from the default 1000 seconds to 3600
|
||||
seconds. The default time limit is too short for a greylist daemon
|
||||
that needs to run long as the SMTP server process that talks to it.
|
||||
process may run to 3600 seconds. The default time limit of 1000
|
||||
seconds is too short; the greylist daemon needs to run long as the
|
||||
SMTP server process that talks to it.
|
||||
See the <a href="spawn.8.html">spawn(8)</a> manpage for more information about the
|
||||
<a href="postconf.5.html#transport_time_limit"><i>transport</i>_time_limit</a> parameter. </p>
|
||||
|
||||
<blockquote> <p> Note: the "greylist_time_limit" parameter will not
|
||||
<blockquote> <p> Note: the "<a href="postconf.5.html#transport_time_limit">greylist_time_limit</a>" parameter will not
|
||||
show up in "postconf" command output before Postfix version 2.9.
|
||||
This limitation applies to many parameters whose name is a combination
|
||||
of a <a href="master.5.html">master.cf</a> service name (in the above example, "greylist") and
|
||||
|
@@ -12,7 +12,8 @@ POSTCONF(1) POSTCONF(1)
|
||||
<b>SYNOPSIS</b>
|
||||
<b>Managing <a href="postconf.5.html">main.cf</a>:</b>
|
||||
|
||||
<b>postconf</b> [<b>-dfhnv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>parameter ...</i>]
|
||||
<b>postconf</b> [<b>-dfhnv</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<b>-C</b> <i>class</i>] [<i>parameter</i>
|
||||
<i>...</i>]
|
||||
|
||||
<b>postconf</b> [<b>-ev</b>] [<b>-c</b> <i>config</i><b>_</b><i>dir</i>] [<i>parameter=value ...</i>]
|
||||
|
||||
@@ -91,6 +92,21 @@ POSTCONF(1) POSTCONF(1)
|
||||
directory instead of the default configuration
|
||||
directory.
|
||||
|
||||
<b>-C</b> <i>class,...</i>
|
||||
When displaying <a href="postconf.5.html"><b>main.cf</b></a> parameters, select only
|
||||
parameters from the specified class(es), specified
|
||||
as a comma-separated list:
|
||||
|
||||
<b>builtin</b>
|
||||
Parameters with built-in names.
|
||||
|
||||
<b>service</b>
|
||||
Parameters with service-defined names (the
|
||||
first field of a <a href="master.5.html"><b>master.cf</b></a> entry plus a
|
||||
Postfix-defined suffix).
|
||||
|
||||
<b>user</b> Parameters with user-defined names.
|
||||
|
||||
<b>-d</b> Print <a href="postconf.5.html"><b>main.cf</b></a> default parameter settings instead of
|
||||
actual settings. Specify <b>-df</b> to fold long lines
|
||||
for human readability (Postfix 2.9 and later).
|
||||
|
@@ -12,7 +12,7 @@ Postfix configuration utility
|
||||
\fBManaging main.cf:\fR
|
||||
|
||||
\fBpostconf\fR [\fB-dfhnv\fR] [\fB-c \fIconfig_dir\fR]
|
||||
[\fIparameter ...\fR]
|
||||
[\fB-C \fIclass\fR] [\fIparameter ...\fR]
|
||||
|
||||
\fBpostconf\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
||||
[\fIparameter=value ...\fR]
|
||||
@@ -90,6 +90,19 @@ This feature is available with Postfix 2.3 and later.
|
||||
.IP "\fB-c \fIconfig_dir\fR"
|
||||
The \fBmain.cf\fR configuration file is in the named directory
|
||||
instead of the default configuration directory.
|
||||
.IP "\fB-C \fIclass,...\fR"
|
||||
When displaying \fBmain.cf\fR parameters, select only
|
||||
parameters from the specified class(es), specified as a
|
||||
comma-separated list:
|
||||
.RS
|
||||
.IP \fBbuiltin\fR
|
||||
Parameters with built-in names.
|
||||
.IP \fBservice\fR
|
||||
Parameters with service-defined names (the first field of
|
||||
a \fBmaster.cf\fR entry plus a Postfix-defined suffix).
|
||||
.IP \fBuser\fR
|
||||
Parameters with user-defined names.
|
||||
.RE
|
||||
.IP \fB-d\fR
|
||||
Print \fBmain.cf\fR default parameter settings instead of
|
||||
actual settings.
|
||||
|
@@ -996,6 +996,11 @@ while (<>) {
|
||||
s;\btlsproxy_tls_session_cache_timeout\b;<a href="postconf.5.html#tlsproxy_tls_session_cache_timeout">$&</a>;g;
|
||||
s;\btlsproxy_use_tls\b;<a href="postconf.5.html#tlsproxy_use_tls">$&</a>;g;
|
||||
|
||||
# Service-defined parameters...
|
||||
|
||||
s;\bpolicy_time_limit\b;<a href="postconf.5.html#transport_time_limit">$&</a>;g;
|
||||
s;\bgreylist_time_limit\b;<a href="postconf.5.html#transport_time_limit">$&</a>;g;
|
||||
|
||||
# Hyperlink URLs and RFC documents
|
||||
|
||||
s/(http:\/\/[^ ,"\(\)]*[^ ,"\(\):;!?.])/<a href="$1">$1<\/a>/;
|
||||
|
@@ -284,9 +284,9 @@ increase the smtpd process limit. </p>
|
||||
open relay. </p>
|
||||
|
||||
<li> <p> Line 11: this increases the time that a policy server
|
||||
process is allowed to run from the default 1000 seconds to 3600
|
||||
seconds. The default time limit is too short for a policy daemon
|
||||
that needs to run long as the SMTP server process that talks to it.
|
||||
process may run to 3600 seconds. The default time limit of 1000
|
||||
seconds is too short; the policy daemon needs to run long as the
|
||||
SMTP server process that talks to it.
|
||||
See the spawn(8) manpage for more information about the
|
||||
<i>transport</i>_time_limit parameter. </p>
|
||||
|
||||
@@ -428,9 +428,9 @@ increase the smtpd process limit. </p>
|
||||
each request and reply. </p>
|
||||
|
||||
<li> <p> Line 6: this increases the time that a greylist server
|
||||
process is allowed to run from the default 1000 seconds to 3600
|
||||
seconds. The default time limit is too short for a greylist daemon
|
||||
that needs to run long as the SMTP server process that talks to it.
|
||||
process may run to 3600 seconds. The default time limit of 1000
|
||||
seconds is too short; the greylist daemon needs to run long as the
|
||||
SMTP server process that talks to it.
|
||||
See the spawn(8) manpage for more information about the
|
||||
<i>transport</i>_time_limit parameter. </p>
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20111127"
|
||||
#define MAIL_RELEASE_DATE "20111129"
|
||||
#define MAIL_VERSION_NUMBER "2.9"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@@ -41,7 +41,8 @@ Makefile: Makefile.in
|
||||
test: $(TESTPROG)
|
||||
|
||||
tests: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
|
||||
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21
|
||||
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 \
|
||||
test22
|
||||
|
||||
root_tests:
|
||||
|
||||
@@ -284,6 +285,16 @@ test21: $(PROG) test21.ref
|
||||
diff test21.ref test21.tmp
|
||||
rm -f main.cf master.cf test21.tmp
|
||||
|
||||
# Like test6, but using a delivery agent that has no _time_limit magic.
|
||||
|
||||
test22: $(PROG) test22.ref
|
||||
rm -f main.cf master.cf
|
||||
touch main.cf master.cf
|
||||
echo whatevershebrings unix - n n - 0 smtp >> master.cf
|
||||
./$(PROG) -c . 2>&1 | grep whatevershebrings >test22.tmp
|
||||
diff test22.ref test22.tmp
|
||||
rm -f main.cf master.cf test22.tmp
|
||||
|
||||
printfck: $(OBJS) $(PROG)
|
||||
rm -rf printfck
|
||||
mkdir printfck
|
||||
@@ -322,6 +333,7 @@ postconf.o: ../../include/mail_run.h
|
||||
postconf.o: ../../include/mail_version.h
|
||||
postconf.o: ../../include/msg.h
|
||||
postconf.o: ../../include/msg_vstream.h
|
||||
postconf.o: ../../include/name_mask.h
|
||||
postconf.o: ../../include/stringops.h
|
||||
postconf.o: ../../include/sys_defs.h
|
||||
postconf.o: ../../include/vbuf.h
|
||||
|
@@ -8,7 +8,7 @@
|
||||
/* \fBManaging main.cf:\fR
|
||||
/*
|
||||
/* \fBpostconf\fR [\fB-dfhnv\fR] [\fB-c \fIconfig_dir\fR]
|
||||
/* [\fIparameter ...\fR]
|
||||
/* [\fB-C \fIclass\fR] [\fIparameter ...\fR]
|
||||
/*
|
||||
/* \fBpostconf\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
|
||||
/* [\fIparameter=value ...\fR]
|
||||
@@ -84,6 +84,19 @@
|
||||
/* .IP "\fB-c \fIconfig_dir\fR"
|
||||
/* The \fBmain.cf\fR configuration file is in the named directory
|
||||
/* instead of the default configuration directory.
|
||||
/* .IP "\fB-C \fIclass,...\fR"
|
||||
/* When displaying \fBmain.cf\fR parameters, select only
|
||||
/* parameters from the specified class(es), specified as a
|
||||
/* comma-separated list:
|
||||
/* .RS
|
||||
/* .IP \fBbuiltin\fR
|
||||
/* Parameters with built-in names.
|
||||
/* .IP \fBservice\fR
|
||||
/* Parameters with service-defined names (the first field of
|
||||
/* a \fBmaster.cf\fR entry plus a Postfix-defined suffix).
|
||||
/* .IP \fBuser\fR
|
||||
/* Parameters with user-defined names.
|
||||
/* .RE
|
||||
/* .IP \fB-d\fR
|
||||
/* Print \fBmain.cf\fR default parameter settings instead of
|
||||
/* actual settings.
|
||||
@@ -315,6 +328,7 @@
|
||||
#include <vstring.h>
|
||||
#include <vstream.h>
|
||||
#include <stringops.h>
|
||||
#include <name_mask.h>
|
||||
|
||||
/* Global library. */
|
||||
|
||||
@@ -349,6 +363,13 @@ int main(int argc, char **argv)
|
||||
struct stat st;
|
||||
int junk;
|
||||
ARGV *ext_argv = 0;
|
||||
int param_class = PC_PARAM_MASK_CLASS;
|
||||
static const NAME_MASK param_class_table[] = {
|
||||
"builtin", PC_PARAM_FLAG_BUILTIN,
|
||||
"service", PC_PARAM_FLAG_SERVICE,
|
||||
"user", PC_PARAM_FLAG_USER,
|
||||
0,
|
||||
};
|
||||
|
||||
/*
|
||||
* Fingerprint executables and core dumps.
|
||||
@@ -378,7 +399,7 @@ int main(int argc, char **argv)
|
||||
/*
|
||||
* Parse JCL.
|
||||
*/
|
||||
while ((ch = GETOPT(argc, argv, "aAbc:deEf#hlmMntv")) > 0) {
|
||||
while ((ch = GETOPT(argc, argv, "aAbc:C:deEf#hlmMntv")) > 0) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
cmd_mode |= SHOW_SASL_SERV;
|
||||
@@ -396,6 +417,10 @@ int main(int argc, char **argv)
|
||||
if (setenv(CONF_ENV_PATH, optarg, 1) < 0)
|
||||
msg_fatal("out of memory");
|
||||
break;
|
||||
case 'C':
|
||||
param_class = name_mask_opt("-C option", param_class_table,
|
||||
optarg, NAME_MASK_ANY_CASE | NAME_MASK_FATAL);
|
||||
break;
|
||||
case 'd':
|
||||
cmd_mode |= SHOW_DEFS;
|
||||
break;
|
||||
@@ -446,7 +471,7 @@ int main(int argc, char **argv)
|
||||
msg_verbose++;
|
||||
break;
|
||||
default:
|
||||
msg_fatal("usage: %s [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]", argv[0]);
|
||||
msg_fatal("usage: %s [-a (server SASL types)] [-A (client SASL types)] [-b (bounce templates)] [-c config_dir] [-C param_class] [-d (defaults)] [-e (edit)] [-f (fold lines)] [-# (comment-out)] [-h (no names)] [-l (lock types)] [-m (map types)] [-M (master.cf)] [-n (non-defaults)] [-v] [name...]", argv[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -548,7 +573,7 @@ int main(int argc, char **argv)
|
||||
/*
|
||||
* Show the requested values.
|
||||
*/
|
||||
show_parameters(cmd_mode, argv + optind);
|
||||
show_parameters(cmd_mode, param_class, argv + optind);
|
||||
|
||||
/*
|
||||
* Flag unused parameters. This makes no sense with "postconf -d",
|
||||
|
@@ -45,8 +45,15 @@ typedef struct {
|
||||
} PC_PARAM_NODE;
|
||||
|
||||
/* Values for flags. See the postconf_node module for narrative text. */
|
||||
#define PC_PARAM_FLAG_NONE (0)
|
||||
#define PC_PARAM_FLAG_RAW (1<<0)
|
||||
#define PC_PARAM_FLAG_RAW (1<<0) /* raw parameter value */
|
||||
#define PC_PARAM_FLAG_BUILTIN (1<<1) /* built-in parameter name */
|
||||
#define PC_PARAM_FLAG_SERVICE (1<<2) /* service-defined parameter name */
|
||||
#define PC_PARAM_FLAG_USER (1<<3) /* user-defined parameter name */
|
||||
|
||||
#define PC_PARAM_MASK_CLASS \
|
||||
(PC_PARAM_FLAG_BUILTIN | PC_PARAM_FLAG_SERVICE | PC_PARAM_FLAG_USER)
|
||||
#define PC_PARAM_CLASS_OVERRIDE(node, class) \
|
||||
((node)->flags = (((node)->flags & ~PC_PARAM_MASK_CLASS) | (class)))
|
||||
|
||||
#define PC_RAW_PARAMETER(node) ((node)->flags & PC_PARAM_FLAG_RAW)
|
||||
|
||||
@@ -123,7 +130,7 @@ extern void set_config_dir(void);
|
||||
*/
|
||||
extern void read_parameters(void);
|
||||
extern void set_parameters(void);
|
||||
extern void show_parameters(int, char **);
|
||||
extern void show_parameters(int, int, char **);
|
||||
|
||||
/*
|
||||
* postconf_edit.c
|
||||
|
@@ -333,36 +333,39 @@ void register_builtin_parameters(void)
|
||||
param_table = PC_PARAM_TABLE_CREATE(100);
|
||||
|
||||
/*
|
||||
* Add the built-in parameters to the global name space.
|
||||
* Add the built-in parameters to the global name space. The class
|
||||
* (built-i) is tentative; some parameters are actually service-defined,
|
||||
* but they have their own default value.
|
||||
*/
|
||||
for (ctt = time_table; ctt->name; ctt++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, ctt->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, ctt->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) ctt, convert_time_parameter);
|
||||
for (cbt = bool_table; cbt->name; cbt++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, cbt->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, cbt->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) cbt, convert_bool_parameter);
|
||||
for (cit = int_table; cit->name; cit++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, cit->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, cit->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) cit, convert_int_parameter);
|
||||
for (cst = str_table; cst->name; cst++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, cst->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, cst->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) cst, convert_str_parameter);
|
||||
for (cft = str_fn_table; cft->name; cft++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, cft->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, cft->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) cft, convert_str_fn_parameter);
|
||||
for (cft = str_fn_table_2; cft->name; cft++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, cft->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, cft->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) cft, convert_str_fn_parameter);
|
||||
for (rst = raw_table; rst->name; rst++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, rst->name, PC_PARAM_FLAG_RAW,
|
||||
PC_PARAM_TABLE_ENTER(param_table, rst->name,
|
||||
PC_PARAM_FLAG_BUILTIN | PC_PARAM_FLAG_RAW,
|
||||
(char *) rst, convert_raw_parameter);
|
||||
for (nst = nint_table; nst->name; nst++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, nst->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, nst->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) nst, convert_nint_parameter);
|
||||
for (bst = nbool_table; bst->name; bst++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, bst->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, bst->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) bst, convert_nbool_parameter);
|
||||
for (lst = long_table; lst->name; lst++)
|
||||
PC_PARAM_TABLE_ENTER(param_table, lst->name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, lst->name, PC_PARAM_FLAG_BUILTIN,
|
||||
(char *) lst, convert_long_parameter);
|
||||
}
|
||||
|
@@ -10,8 +10,9 @@
|
||||
/*
|
||||
/* void set_parameters()
|
||||
/*
|
||||
/* void show_parameters(mode, names)
|
||||
/* void show_parameters(mode, param_class, names)
|
||||
/* int mode;
|
||||
/* int param_class;
|
||||
/* char **names;
|
||||
/* DESCRIPTION
|
||||
/* read_parameters() reads parameters from main.cf.
|
||||
@@ -39,6 +40,16 @@
|
||||
/* .IP SHOW_EVAL
|
||||
/* Expand parameter values (not implemented).
|
||||
/* .RE
|
||||
/* .IP param_class
|
||||
/* Bit-wise OR of one or more of the following:
|
||||
/* .RS
|
||||
/* .IP PC_PARAM_FLAG_BUILTIN
|
||||
/* Show built-in parameters.
|
||||
/* .IP PC_PARAM_FLAG_SERVICE
|
||||
/* Show service-defined parameters.
|
||||
/* .IP PC_PARAM_FLAG_USER
|
||||
/* Show user-defined parameters.
|
||||
/* .RE
|
||||
/* .IP names
|
||||
/* List of zero or more parameter names. If the list is empty,
|
||||
/* output all parameters.
|
||||
@@ -225,7 +236,7 @@ static int comp_names(const void *a, const void *b)
|
||||
|
||||
/* show_parameters - show parameter info */
|
||||
|
||||
void show_parameters(int mode, char **names)
|
||||
void show_parameters(int mode, int param_class, char **names)
|
||||
{
|
||||
PC_PARAM_INFO **list;
|
||||
PC_PARAM_INFO **ht;
|
||||
@@ -239,6 +250,7 @@ void show_parameters(int mode, char **names)
|
||||
list = PC_PARAM_TABLE_LIST(param_table);
|
||||
qsort((char *) list, param_table->used, sizeof(*list), comp_names);
|
||||
for (ht = list; *ht; ht++)
|
||||
if (param_class & PC_PARAM_INFO_NODE(*ht)->flags)
|
||||
print_parameter(mode, PC_PARAM_INFO_NAME(*ht),
|
||||
PC_PARAM_INFO_NODE(*ht));
|
||||
myfree((char *) list);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/* NAME
|
||||
/* postconf_service 3
|
||||
/* SUMMARY
|
||||
/* service-defined parameter support
|
||||
/* service-defined parameter name support
|
||||
/* SYNOPSIS
|
||||
/* #include <postconf.h>
|
||||
/*
|
||||
@@ -89,16 +89,22 @@ static void register_service_parameter(const char *service, const char *suffix,
|
||||
const char *defparam)
|
||||
{
|
||||
char *name = concatenate(service, suffix, (char *) 0);
|
||||
PC_PARAM_NODE *node;
|
||||
|
||||
/*
|
||||
* Skip service parameter names that have built-in definitions. This
|
||||
* happens with message delivery transports that have a non-default
|
||||
* per-destination concurrency or recipient limit, such as local(8).
|
||||
*
|
||||
* Some parameters were tentatively flagged as built-in, but they are
|
||||
* service parameters with their own default value. We don't change the
|
||||
* default but we correct the parameter class.
|
||||
*/
|
||||
if (PC_PARAM_TABLE_LOCATE(param_table, name) != 0) {
|
||||
if ((node = PC_PARAM_TABLE_FIND(param_table, name)) != 0) {
|
||||
PC_PARAM_CLASS_OVERRIDE(node, PC_PARAM_FLAG_SERVICE);
|
||||
myfree(name);
|
||||
} else {
|
||||
PC_PARAM_TABLE_ENTER(param_table, name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, name, PC_PARAM_FLAG_SERVICE,
|
||||
(char *) defparam, convert_service_parameter);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
/* NAME
|
||||
/* postconf_user 3
|
||||
/* SUMMARY
|
||||
/* support for user-defined parameters
|
||||
/* support for user-defined parameter names
|
||||
/* SYNOPSIS
|
||||
/* #include <postconf.h>
|
||||
/*
|
||||
@@ -13,11 +13,12 @@
|
||||
/* space of each master.cf entry. Parameters in local name
|
||||
/* spaces take precedence over global parameters.
|
||||
/*
|
||||
/* There are three categories of known parameters: built-in,
|
||||
/* There are three categories of known parameter names: built-in,
|
||||
/* service-defined (see postconf_service.c), and valid
|
||||
/* user-defined.
|
||||
/*
|
||||
/* There are two categories of valid user-defined parameters:
|
||||
/* There are two categories of valid user-defined parameter
|
||||
/* names:
|
||||
/*
|
||||
/* - Parameters whose user-defined-name appears in the value
|
||||
/* of smtpd_restriction_classes in main.cf or master.cf.
|
||||
@@ -28,7 +29,7 @@
|
||||
/* - In both cases the parameters must have a
|
||||
/* "user-defined-name=value" entry in main.cf or master.cf.
|
||||
/*
|
||||
/* Other user-defined parameters are flagged as "unused".
|
||||
/* Other user-defined parameter names are flagged as "unused".
|
||||
/*
|
||||
/* register_user_parameters() scans the global and per-service
|
||||
/* name spaces for user-defined parameters and flags
|
||||
@@ -122,11 +123,11 @@ static const char *flag_user_parameter(const char *mac_name,
|
||||
if (local_scope && dict_get(local_scope->all_params, mac_name)) {
|
||||
if (PC_PARAM_TABLE_LOCATE(local_scope->valid_names, mac_name) == 0)
|
||||
PC_PARAM_TABLE_ENTER(local_scope->valid_names, mac_name,
|
||||
PC_PARAM_FLAG_NONE, PC_PARAM_NO_DATA,
|
||||
PC_PARAM_FLAG_USER, PC_PARAM_NO_DATA,
|
||||
convert_user_parameter);
|
||||
} else if (mail_conf_lookup(mac_name) != 0) {
|
||||
if (PC_PARAM_TABLE_LOCATE(param_table, mac_name) == 0)
|
||||
PC_PARAM_TABLE_ENTER(param_table, mac_name, PC_PARAM_FLAG_NONE,
|
||||
PC_PARAM_TABLE_ENTER(param_table, mac_name, PC_PARAM_FLAG_USER,
|
||||
PC_PARAM_NO_DATA, convert_user_parameter);
|
||||
}
|
||||
return (0);
|
||||
@@ -198,7 +199,7 @@ static void scan_user_parameter_namespace(const char *dict_name,
|
||||
&& PC_PARAM_TABLE_LOCATE(local_scope->valid_names, cparam_name) == 0
|
||||
&& htable_locate(rest_class_table, cparam_name) != 0)
|
||||
PC_PARAM_TABLE_ENTER(local_scope->valid_names, cparam_name,
|
||||
PC_PARAM_FLAG_NONE, PC_PARAM_NO_DATA,
|
||||
PC_PARAM_FLAG_USER, PC_PARAM_NO_DATA,
|
||||
convert_user_parameter);
|
||||
/* Skip "do not expand" parameters. */
|
||||
if ((node = PC_PARAM_TABLE_FIND(param_table, cparam_name)) != 0
|
||||
|
15
postfix/src/postconf/test22.ref
Normal file
15
postfix/src/postconf/test22.ref
Normal file
@@ -0,0 +1,15 @@
|
||||
whatevershebrings_delivery_slot_cost = $default_delivery_slot_cost
|
||||
whatevershebrings_delivery_slot_discount = $default_delivery_slot_discount
|
||||
whatevershebrings_delivery_slot_loan = $default_delivery_slot_loan
|
||||
whatevershebrings_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit
|
||||
whatevershebrings_destination_concurrency_limit = $default_destination_concurrency_limit
|
||||
whatevershebrings_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback
|
||||
whatevershebrings_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback
|
||||
whatevershebrings_destination_rate_delay = $default_destination_rate_delay
|
||||
whatevershebrings_destination_recipient_limit = $default_destination_recipient_limit
|
||||
whatevershebrings_extra_recipient_limit = $default_extra_recipient_limit
|
||||
whatevershebrings_initial_destination_concurrency = $initial_destination_concurrency
|
||||
whatevershebrings_minimum_delivery_slots = $default_minimum_delivery_slots
|
||||
whatevershebrings_recipient_limit = $default_recipient_limit
|
||||
whatevershebrings_recipient_refill_delay = $default_recipient_refill_delay
|
||||
whatevershebrings_recipient_refill_limit = $default_recipient_refill_limit
|
Reference in New Issue
Block a user