1POSTCONF(1) General Commands Manual POSTCONF(1)
2
3
4
6 postconf - Postfix configuration utility
7
9 Managing main.cf:
10
11 postconf [-dfhHnopvx] [-c config_dir] [-C class,...] [parameter ...]
12
13 postconf [-epv] [-c config_dir] parameter=value ...
14
15 postconf -# [-pv] [-c config_dir] parameter ...
16
17 postconf -X [-pv] [-c config_dir] parameter ...
18
19 Managing master.cf service entries:
20
21 postconf -M [-fovx] [-c config_dir] [service[/type] ...]
22
23 postconf -M [-ev] [-c config_dir] service/type=value ...
24
25 postconf -M# [-v] [-c config_dir] service/type ...
26
27 postconf -MX [-v] [-c config_dir] service/type ...
28
29 Managing master.cf service fields:
30
31 postconf -F [-fhHovx] [-c config_dir] [service[/type[/field]] ...]
32
33 postconf -F [-ev] [-c config_dir] service/type/field=value ...
34
35 Managing master.cf service parameters:
36
37 postconf -P [-fhHovx] [-c config_dir] [service[/type[/parameter]] ...]
38
39 postconf -P [-ev] [-c config_dir] service/type/parameter=value ...
40
41 postconf -PX [-v] [-c config_dir] service/type/parameter ...
42
43 Managing bounce message templates:
44
45 postconf -b [-v] [-c config_dir] [template_file]
46
47 postconf -t [-v] [-c config_dir] [template_file]
48
49 Managing TLS features:
50
51 postconf -T mode [-v] [-c config_dir]
52
53 Managing other configuration:
54
55 postconf -a|-A|-l|-m [-v] [-c config_dir]
56
58 By default, the postconf(1) command displays the values of main.cf con‐
59 figuration parameters, and warns about possible mis-typed parameter
60 names (Postfix 2.9 and later). The command can also change main.cf
61 configuration parameter values, or display other configuration informa‐
62 tion about the Postfix mail system.
63
64 Options:
65
66 -a List the available SASL plug-in types for the Postfix SMTP
67 server. The plug-in type is selected with the smtpd_sasl_type
68 configuration parameter by specifying one of the names listed
69 below.
70
71 cyrus This server plug-in is available when Postfix is built
72 with Cyrus SASL support.
73
74 dovecot
75 This server plug-in uses the Dovecot authentication
76 server, and is available when Postfix is built with any
77 form of SASL support.
78
79 This feature is available with Postfix 2.3 and later.
80
81 -A List the available SASL plug-in types for the Postfix SMTP
82 client. The plug-in type is selected with the smtp_sasl_type or
83 lmtp_sasl_type configuration parameters by specifying one of the
84 names listed below.
85
86 cyrus This client plug-in is available when Postfix is built
87 with Cyrus SASL support.
88
89 This feature is available with Postfix 2.3 and later.
90
91 -b [template_file]
92 Display the message text that appears at the beginning of deliv‐
93 ery status notification (DSN) messages, expanding $name expres‐
94 sions with actual values as described in bounce(5).
95
96 To override the bounce_template_file parameter setting, specify
97 a template file name at the end of the "postconf -b" command
98 line. Specify an empty file name to display built-in templates
99 (in shell language: "").
100
101 This feature is available with Postfix 2.3 and later.
102
103 -c config_dir
104 The main.cf configuration file is in the named directory instead
105 of the default configuration directory.
106
107 -C class,...
108 When displaying main.cf parameters, select only parameters from
109 the specified class(es):
110
111 builtin
112 Parameters with built-in names.
113
114 service
115 Parameters with service-defined names (the first field of
116 a master.cf entry plus a Postfix-defined suffix).
117
118 user Parameters with user-defined names.
119
120 all All the above classes.
121
122 The default is as if "-C all" is specified.
123
124 This feature is available with Postfix 2.9 and later.
125
126 -d Print main.cf default parameter settings instead of actual set‐
127 tings. Specify -df to fold long lines for human readability
128 (Postfix 2.9 and later).
129
130 -e Edit the main.cf configuration file, and update parameter set‐
131 tings with the "name=value" pairs on the postconf(1) command
132 line.
133
134 With -M, edit the master.cf configuration file, and replace one
135 or more service entries with new values as specified with "ser‐
136 vice/type=value" on the postconf(1) command line.
137
138 With -F, edit the master.cf configuration file, and replace one
139 or more service fields with new values as specified with "ser‐
140 vice/type/field=value" on the postconf(1) command line. Cur‐
141 rently, the "command" field contains the command name and com‐
142 mand arguments. This may change in the near future, so that the
143 "command" field contains only the command name, and a new "argu‐
144 ments" pseudofield contains the command arguments.
145
146 With -P, edit the master.cf configuration file, and add or up‐
147 date one or more service parameter settings (-o parameter=value
148 settings) with new values as specified with "service/type/param‐
149 eter=value" on the postconf(1) command line.
150
151 In all cases the file is copied to a temporary file then renamed
152 into place. Specify quotes to protect special characters and
153 whitespace on the postconf(1) command line.
154
155 The -e option is no longer needed with Postfix version 2.8 and
156 later, as it is assumed whenever a value is specified (empty or
157 non-empty).
158
159 -f Fold long lines when printing main.cf or master.cf configuration
160 file entries, for human readability.
161
162 This feature is available with Postfix 2.9 and later.
163
164 -F Show master.cf per-entry field settings (by default all services
165 and all fields), formatted as "service/type/field=value", one
166 per line. Specify -Ff to fold long lines.
167
168 Specify one or more "service/type/field" instances on the post‐
169 conf(1) command line to limit the output to fields of interest.
170 Trailing parameter name or service type fields that are omitted
171 will be handled as "*" wildcard fields.
172
173 This feature is available with Postfix 2.11 and later.
174
175 -h Show parameter or attribute values without the "name = " label
176 that normally precedes the value.
177
178 -H Show parameter or attribute names without the " = value" that
179 normally follows the name.
180
181 This feature is available with Postfix 3.1 and later.
182
183 -l List the names of all supported mailbox locking methods. Post‐
184 fix supports the following methods:
185
186 flock A kernel-based advisory locking method for local files
187 only. This locking method is available on systems with a
188 BSD compatible library.
189
190 fcntl A kernel-based advisory locking method for local and re‐
191 mote files.
192
193 dotlock
194 An application-level locking method. An application locks
195 a file named filename by creating a file named file‐
196 name.lock. The application is expected to remove its own
197 lock file, as well as stale lock files that were left be‐
198 hind after abnormal program termination.
199
200 -m List the names of all supported lookup table types. In Postfix
201 configuration files, lookup tables are specified as type:name,
202 where type is one of the types listed below. The table name syn‐
203 tax depends on the lookup table type as described in the DATA‐
204 BASE_README document.
205
206 btree A sorted, balanced tree structure. Available on systems
207 with support for Berkeley DB databases.
208
209 cdb A read-optimized structure with no support for incremen‐
210 tal updates. Available on systems with support for CDB
211 databases.
212
213 This feature is available with Postfix 2.2 and later.
214
215 cidr A table that associates values with Classless Inter-Do‐
216 main Routing (CIDR) patterns. This is described in
217 cidr_table(5).
218
219 This feature is available with Postfix 2.2 and later.
220
221 dbm An indexed file type based on hashing. Available on sys‐
222 tems with support for DBM databases.
223
224 environ
225 The UNIX process environment array. The lookup key is the
226 environment variable name; the table name is ignored.
227 Originally implemented for testing, someone may find this
228 useful someday.
229
230 fail A table that reliably fails all requests. The lookup ta‐
231 ble name is used for logging. This table exists to sim‐
232 plify Postfix error tests.
233
234 This feature is available with Postfix 2.9 and later.
235
236 hash An indexed file type based on hashing. Available on sys‐
237 tems with support for Berkeley DB databases.
238
239 inline (read-only)
240 A non-shared, in-memory lookup table. Example: "inline:{
241 key=value, { key = text with whitespace or comma }}".
242 Key-value pairs are separated by whitespace or comma;
243 with a key-value pair inside "{}", whitespace is ignored
244 after the opening "{", around the "=" between key and
245 value, and before the closing "}". Inline tables elimi‐
246 nate the need to create a database file for just a few
247 fixed elements. See also the static: map type.
248
249 This feature is available with Postfix 3.0 and later.
250
251 internal
252 A non-shared, in-memory hash table. Its content are lost
253 when a process terminates.
254
255 lmdb OpenLDAP LMDB database (a memory-mapped, persistent
256 file). Available on systems with support for LMDB data‐
257 bases. This is described in lmdb_table(5).
258
259 This feature is available with Postfix 2.11 and later.
260
261 ldap (read-only)
262 LDAP database client. This is described in ldap_table(5).
263
264 memcache
265 Memcache database client. This is described in mem‐
266 cache_table(5).
267
268 This feature is available with Postfix 2.9 and later.
269
270 mysql (read-only)
271 MySQL database client. Available on systems with support
272 for MySQL databases. This is described in mysql_ta‐
273 ble(5).
274
275 pcre (read-only)
276 A lookup table based on Perl Compatible Regular Expres‐
277 sions. The file format is described in pcre_table(5).
278
279 pgsql (read-only)
280 PostgreSQL database client. This is described in
281 pgsql_table(5).
282
283 This feature is available with Postfix 2.1 and later.
284
285 pipemap (read-only)
286 A lookup table that constructs a pipeline of tables. Ex‐
287 ample: "pipemap:{type_1:name_1, ..., type_n:name_n}".
288 Each "pipemap:" query is given to the first table. Each
289 lookup result becomes the query for the next table in the
290 pipeline, and the last table produces the final result.
291 When any table lookup produces no result, the pipeline
292 produces no result. The first and last characters of the
293 "pipemap:" table name must be "{" and "}". Within these,
294 individual maps are separated with comma or whitespace.
295
296 This feature is available with Postfix 3.0 and later.
297
298 proxy Postfix proxymap(8) client for shared access to Postfix
299 databases. The table name syntax is type:name.
300
301 This feature is available with Postfix 2.0 and later.
302
303 randmap (read-only)
304 An in-memory table that performs random selection. Exam‐
305 ple: "randmap:{result_1, ..., result_n}". Each table
306 query returns a random choice from the specified results.
307 The first and last characters of the "randmap:" table
308 name must be "{" and "}". Within these, individual re‐
309 sults are separated with comma or whitespace. To give a
310 specific result more weight, specify it multiple times.
311
312 This feature is available with Postfix 3.0 and later.
313
314 regexp (read-only)
315 A lookup table based on regular expressions. The file
316 format is described in regexp_table(5).
317
318 sdbm An indexed file type based on hashing. Available on sys‐
319 tems with support for SDBM databases.
320
321 This feature is available with Postfix 2.2 and later.
322
323 socketmap (read-only)
324 Sendmail-style socketmap client. The table name is
325 inet:host:port:name for a TCP/IP server, or unix:path‐
326 name:name for a UNIX-domain server. This is described in
327 socketmap_table(5).
328
329 This feature is available with Postfix 2.10 and later.
330
331 sqlite (read-only)
332 SQLite database. This is described in sqlite_table(5).
333
334 This feature is available with Postfix 2.8 and later.
335
336 static (read-only)
337 A table that always returns its name as lookup result.
338 For example, static:foobar always returns the string foo‐
339 bar as lookup result. Specify "static:{ text with white‐
340 space }" when the result contains whitespace; this form
341 ignores whitespace after the opening "{" and before the
342 closing "}". See also the inline: map.
343
344 The form "static:{text} is available with Postfix 3.0 and
345 later.
346
347 tcp (read-only)
348 TCP/IP client. The protocol is described in tcp_table(5).
349
350 texthash (read-only)
351 Produces similar results as hash: files, except that you
352 don't need to run the postmap(1) command before you can
353 use the file, and that it does not detect changes after
354 the file is read.
355
356 This feature is available with Postfix 2.8 and later.
357
358 unionmap (read-only)
359 A table that sends each query to multiple lookup tables
360 and that concatenates all found results, separated by
361 comma. The table name syntax is the same as for pipemap.
362
363 This feature is available with Postfix 3.0 and later.
364
365 unix (read-only)
366 A limited view of the UNIX authentication database. The
367 following tables are implemented:
368
369 unix:passwd.byname
370 The table is the UNIX password database. The key
371 is a login name. The result is a password file
372 entry in passwd(5) format.
373
374 unix:group.byname
375 The table is the UNIX group database. The key is a
376 group name. The result is a group file entry in
377 group(5) format.
378
379 Other table types may exist depending on how Postfix was built.
380
381 -M Show master.cf file contents instead of main.cf file contents.
382 Specify -Mf to fold long lines for human readability.
383
384 Specify zero or more arguments, each with a service-name or ser‐
385 vice-name/service-type pair, where service-name is the first
386 field of a master.cf entry and service-type is one of (inet,
387 unix, fifo, or pass).
388
389 If service-name or service-name/service-type is specified, only
390 the matching master.cf entries will be output. For example,
391 "postconf -Mf smtp" will output all services named "smtp", and
392 "postconf -Mf smtp/inet" will output only the smtp service that
393 listens on the network. Trailing service type fields that are
394 omitted will be handled as "*" wildcard fields.
395
396 This feature is available with Postfix 2.9 and later. The syntax
397 was changed from "name.type" to "name/type", and "*" wildcard
398 support was added with Postfix 2.11.
399
400 -n Show only configuration parameters that have explicit name=value
401 settings in main.cf. Specify -nf to fold long lines for human
402 readability (Postfix 2.9 and later). To show settings that dif‐
403 fer from built-in defaults only, use the following bash syntax:
404 LANG=C comm -23 <(postconf -n) <(postconf -d)
405 Replace "-23" with "-12" to show settings that duplicate
406 built-in defaults.
407
408 -o name=value
409 Override main.cf parameter settings. This lets you see the ef‐
410 fect changing a parameter would have when it is used in other
411 configuration parameters, e.g.:
412 postconf -x -o stress=yes
413
414 This feature is available with Postfix 2.10 and later.
415
416 -p Show main.cf parameter settings. This is the default.
417
418 This feature is available with Postfix 2.11 and later.
419
420 -P Show master.cf service parameter settings (by default all ser‐
421 vices and all parameters), formatted as "service/type/parame‐
422 ter=value", one per line. Specify -Pf to fold long lines.
423
424 Specify one or more "service/type/parameter" instances on the
425 postconf(1) command line to limit the output to parameters of
426 interest. Trailing parameter name or service type fields that
427 are omitted will be handled as "*" wildcard fields.
428
429 This feature is available with Postfix 2.11 and later.
430
431 -t [template_file]
432 Display the templates for text that appears at the beginning of
433 delivery status notification (DSN) messages, without expanding
434 $name expressions.
435
436 To override the bounce_template_file parameter setting, specify
437 a template file name at the end of the "postconf -t" command
438 line. Specify an empty file name to display built-in templates
439 (in shell language: "").
440
441 This feature is available with Postfix 2.3 and later.
442
443 -T mode
444 If Postfix is compiled without TLS support, the -T option pro‐
445 duces no output. Otherwise, if an invalid mode is specified,
446 the -T option reports an error and exits with a non-zero status
447 code. The valid modes are:
448
449 compile-version
450 Output the OpenSSL version that Postfix was compiled with
451 (i.e. the OpenSSL version in a header file). The output
452 format is the same as with the command "openssl version".
453
454 run-version
455 Output the OpenSSL version that Postfix is linked with at
456 runtime (i.e. the OpenSSL version in a shared library).
457
458 public-key-algorithms
459 Output the lower-case names of the supported public-key
460 algorithms, one per-line.
461
462 This feature is available with Postfix 3.1 and later.
463
464 -v Enable verbose logging for debugging purposes. Multiple -v op‐
465 tions make the software increasingly verbose.
466
467 -x Expand $name in main.cf or master.cf parameter values. The ex‐
468 pansion is recursive.
469
470 This feature is available with Postfix 2.10 and later.
471
472 -X Edit the main.cf configuration file, and remove the parameters
473 named on the postconf(1) command line. Specify a list of param‐
474 eter names, not "name=value" pairs.
475
476 With -M, edit the master.cf configuration file, and remove one
477 or more service entries as specified with "service/type" on the
478 postconf(1) command line.
479
480 With -P, edit the master.cf configuration file, and remove one
481 or more service parameter settings (-o parameter=value settings)
482 as specified with "service/type/parameter" on the postconf(1)
483 command line.
484
485 In all cases the file is copied to a temporary file then renamed
486 into place. Specify quotes to protect special characters on the
487 postconf(1) command line.
488
489 There is no postconf(1) command to perform the reverse opera‐
490 tion.
491
492 This feature is available with Postfix 2.10 and later. Support
493 for -M and -P was added with Postfix 2.11.
494
495 -# Edit the main.cf configuration file, and comment out the parame‐
496 ters named on the postconf(1) command line, so that those param‐
497 eters revert to their default values. Specify a list of parame‐
498 ter names, not "name=value" pairs.
499
500 With -M, edit the master.cf configuration file, and comment out
501 one or more service entries as specified with "service/type" on
502 the postconf(1) command line.
503
504 In all cases the file is copied to a temporary file then renamed
505 into place. Specify quotes to protect special characters on the
506 postconf(1) command line.
507
508 There is no postconf(1) command to perform the reverse opera‐
509 tion.
510
511 This feature is available with Postfix 2.6 and later. Support
512 for -M was added with Postfix 2.11.
513
515 Problems are reported to the standard error stream.
516
518 MAIL_CONFIG
519 Directory with Postfix configuration files.
520
522 The following main.cf parameters are especially relevant to this pro‐
523 gram.
524
525 The text below provides only a parameter summary. See postconf(5) for
526 more details including examples.
527
528 config_directory (see 'postconf -d' output)
529 The default location of the Postfix main.cf and master.cf con‐
530 figuration files.
531
532 bounce_template_file (empty)
533 Pathname of a configuration file with bounce message templates.
534
536 /etc/postfix/main.cf, Postfix configuration parameters
537 /etc/postfix/master.cf, Postfix master daemon configuration
538
540 bounce(5), bounce template file format
541 master(5), master.cf configuration file syntax
542 postconf(5), main.cf configuration file syntax
543
545 Use "postconf readme_directory" or "postconf html_directory" to locate
546 this information.
547 DATABASE_README, Postfix lookup table overview
548
550 The Secure Mailer license must be distributed with this software.
551
553 Wietse Venema
554 IBM T.J. Watson Research
555 P.O. Box 704
556 Yorktown Heights, NY 10598, USA
557
558 Wietse Venema
559 Google, Inc.
560 111 8th Avenue
561 New York, NY 10011, USA
562
563
564
565 POSTCONF(1)