summaryrefslogtreecommitdiffstats
path: root/src/postconf/postconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/postconf/postconf.c')
-rw-r--r--src/postconf/postconf.c40
1 files changed, 28 insertions, 12 deletions
diff --git a/src/postconf/postconf.c b/src/postconf/postconf.c
index f598a5b..74f13b2 100644
--- a/src/postconf/postconf.c
+++ b/src/postconf/postconf.c
@@ -8,7 +8,7 @@
/* .ti -4
/* \fBManaging main.cf:\fR
/*
-/* \fBpostconf\fR [\fB-dfhHnopvx\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR [\fB-dfhHnopqvx\fR] [\fB-c \fIconfig_dir\fR]
/* [\fB-C \fIclass,...\fR] [\fIparameter ...\fR]
/*
/* \fBpostconf\fR [\fB-epv\fR] [\fB-c \fIconfig_dir\fR]
@@ -23,7 +23,7 @@
/* .ti -4
/* \fBManaging master.cf service entries:\fR
/*
-/* \fBpostconf\fR \fB-M\fR [\fB-fovx\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR \fB-M\fR [\fB-foqvx\fR] [\fB-c \fIconfig_dir\fR]
/* [\fIservice\fR[\fB/\fItype\fR]\fI ...\fR]
/*
/* \fBpostconf\fR \fB-M\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
@@ -38,7 +38,7 @@
/* .ti -4
/* \fBManaging master.cf service fields:\fR
/*
-/* \fBpostconf\fR \fB-F\fR [\fB-fhHovx\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR \fB-F\fR [\fB-fhHoqvx\fR] [\fB-c \fIconfig_dir\fR]
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIfield\fR]]\fI ...\fR]
/*
/* \fBpostconf\fR \fB-F\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
@@ -47,7 +47,7 @@
/* .ti -4
/* \fBManaging master.cf service parameters:\fR
/*
-/* \fBpostconf\fR \fB-P\fR [\fB-fhHovx\fR] [\fB-c \fIconfig_dir\fR]
+/* \fBpostconf\fR \fB-P\fR [\fB-fhHoqvx\fR] [\fB-c \fIconfig_dir\fR]
/* [\fIservice\fR[\fB/\fItype\fR[\fB/\fIparameter\fR]]\fI ...\fR]
/*
/* \fBpostconf\fR \fB-P\fR [\fB-ev\fR] [\fB-c \fIconfig_dir\fR]
@@ -293,6 +293,11 @@
/* \fBmemcache_table\fR(5).
/*
/* This feature is available with Postfix 2.9 and later.
+/* .IP "\fBmongodb\fR"
+/* MongoDB database client. This is described in
+/* \fBmongodb_table\fR(5).
+/*
+/* This feature is available with Postfix 3.9 and later.
/* .IP "\fBmysql\fR (read-only)"
/* MySQL database client. Available on systems with support
/* for MySQL databases. This is described in \fBmysql_table\fR(5).
@@ -452,6 +457,10 @@
/* wildcard fields.
/*
/* This feature is available with Postfix 2.11 and later.
+/* .IP \fB-q\fR
+/* Do not log warnings for deprecated or unused parameters.
+/*
+/* This feature is available with Postfix 3.9 and later.
/* .IP "\fB-t\fR [\fItemplate_file\fR]"
/* Display the templates for text that appears at the beginning
/* of delivery status notification (DSN) messages, without
@@ -779,6 +788,8 @@ static void pcf_check_compat_options(int optval)
const int (*op)[2];
int excess;
+ optval &= ~PCF_DEF_MODE;
+
for (op = pcf_compat_options; op[0][0] != 0; op++) {
if ((optval & *op[0]) != 0
&& (excess = (optval & ~((*op)[0] | (*op)[1]))) != 0)
@@ -844,7 +855,7 @@ int main(int argc, char **argv)
/*
* Parse JCL.
*/
- while ((ch = GETOPT(argc, argv, "aAbc:C:deEfFhHlmMno:pPtT:vxX#")) > 0) {
+ while ((ch = GETOPT(argc, argv, "aAbc:C:deEfFhHlmMno:pPqtT:vxX#")) > 0) {
switch (ch) {
case 'a':
pcf_cmd_mode |= PCF_SHOW_SASL_SERV;
@@ -912,6 +923,9 @@ int main(int argc, char **argv)
case 'P':
pcf_cmd_mode |= PCF_MASTER_PARAM;
break;
+ case 'q':
+ pcf_cmd_mode &= ~(PCF_WARN_UNUSED_DEPRECATED);
+ break;
case 't':
pcf_cmd_mode |= PCF_DUMP_DSN_TEMPL;
if (ext_argv)
@@ -1028,7 +1042,7 @@ int main(int argc, char **argv)
pcf_set_parameters(override_params->argv);
pcf_register_builtin_parameters(basename(argv[0]), getpid());
pcf_register_service_parameters();
- pcf_register_user_parameters();
+ pcf_register_user_parameters(pcf_cmd_mode);
if (pcf_cmd_mode & PCF_MASTER_FLD)
pcf_show_master_fields(VSTREAM_OUT, pcf_cmd_mode, argc - optind,
argv + optind);
@@ -1038,7 +1052,8 @@ int main(int argc, char **argv)
else
pcf_show_master_entries(VSTREAM_OUT, pcf_cmd_mode, argc - optind,
argv + optind);
- pcf_flag_unused_master_parameters();
+ if (pcf_cmd_mode & PCF_WARN_UNUSED_DEPRECATED)
+ pcf_flag_unused_master_parameters();
}
/*
@@ -1090,7 +1105,7 @@ int main(int argc, char **argv)
pcf_read_master(PCF_WARN_ON_OPEN_ERROR);
pcf_register_service_parameters();
if ((pcf_cmd_mode & PCF_SHOW_DEFS) == 0)
- pcf_register_user_parameters();
+ pcf_register_user_parameters(pcf_cmd_mode);
/*
* Show the requested values.
@@ -1099,11 +1114,12 @@ int main(int argc, char **argv)
argv + optind);
/*
- * Flag unused parameters. This makes no sense with "postconf -d",
- * because that ignores all the user-specified parameters and
- * user-specified macro expansions in main.cf.
+ * Flag unused or deprecated parameters. This makes no sense with
+ * "postconf -d", because that ignores all the user-specified
+ * parameters and user-specified macro expansions in main.cf.
*/
- if ((pcf_cmd_mode & PCF_SHOW_DEFS) == 0) {
+ if ((pcf_cmd_mode & PCF_SHOW_DEFS) == 0
+ && (pcf_cmd_mode & PCF_WARN_UNUSED_DEPRECATED) != 0) {
pcf_flag_unused_main_parameters();
pcf_flag_unused_master_parameters();
}