POSTCONF(1)
π postconf(1) π
okay bestie, welcome to POSTCONF(1) β the General Commands Manual page for the Postfix configuration utility, and honestly? she does a LOT. buckle up, we're reading the whole thing πΈ
β¨ NAME β¨
postconf β Postfix configuration utility π
π¦ SYNOPSIS π¦
Managing main.cf:
postconf [-dfhHjnopqvx] [-c config_dir] [-C class,...] [parameter ...]
postconf [-epv] [-c config_dir] parameter=value ...
postconf -# [-pv] [-c config_dir] parameter ...
postconf -X [-pv] [-c config_dir] parameter ...
Managing master.cf service entries:
postconf -M [-joqvx] [-c config_dir] [service[/type] ...]
postconf -M [-ev] [-c config_dir] service/type=value ...
postconf -M# [-v] [-c config_dir] service/type ...
postconf -MX [-v] [-c config_dir] service/type ...
Managing master.cf service fields:
postconf -F [-fhHjoqvx] [-c config_dir] [service[/type[/field]] ...]
postconf -F [-ev] [-c config_dir] service/type/field=value ...
Managing master.cf service parameters:
postconf -P [-fhHjoqvx] [-c config_dir] [service[/type[/parameter]] ...]
postconf -P [-ev] [-c config_dir] service/type/parameter=value ...
postconf -PX [-v] [-c config_dir] service/type/parameter ...
Managing bounce message templates:
postconf -b [-v] [-c config_dir] [template_file]
postconf -t [-v] [-c config_dir] [template_file]
Managing TLS features:
postconf -T mode [-v] [-c config_dir]
Managing other configuration:
postconf -a|-A|-l|-m [-v] [-c config_dir]
π DESCRIPTION π
By default, the postconf(1) command shows you the values of main.cf configuration parameters, and (Postfix 2.9 and later) it will side-eye you with a warning if you might have mis-typed a parameter name. but babes, that's not all she does β she can also change main.cf parameter values, or show you other configuration info about the Postfix mail system. multi-talented fr fr π
Options:
π Option-by-option breakdown, as promised π
-aβ List the available SASL plug-in types for the Postfix SMTP server. You pick the plug-in type with thesmtpd_sasl_typeconfiguration parameter, by naming one of these:cyrusβ this server plug-in is available when Postfix is built with Cyrus SASL support.dovecotβ this server plug-in uses the Dovecot authentication server, and it's available when Postfix is built with any form of SASL support.
This feature is available with Postfix 2.3 and later.
-Aβ List the available SASL plug-in types for the Postfix SMTP client. You pick the plug-in type with thesmtp_sasl_typeorlmtp_sasl_typeconfiguration parameters, by naming one of these:cyrusβ this client plug-in is available when Postfix is built with Cyrus SASL support.
This feature is available with Postfix 2.3 and later.
-b[template_file]β Display the message text that appears at the beginning of delivery status notification (DSN) messages, expanding$nameexpressions with actual values as described inbounce(5).
To override the bounce_template_file parameter setting, specify a template file name at the end of the postconf -b command line. Specify an empty file name to display built-in templates (in shell language: "").
This feature is available with Postfix 2.3 and later.
-cconfig_dirβ themain.cfconfiguration file lives in the named directory instead of the default configuration directory.-Cclass,...β when displayingmain.cfparameters, select only parameters from the specified class(es):builtinβ parameters with built-in names.serviceβ parameters with service-defined names (the first field of amaster.cfentry plus a Postfix-defined suffix).userβ parameters with user-defined names.allβ all the above classes.
The default is as if -C all is specified.
This feature is available with Postfix 2.9 and later.
-dβ printmain.cfdefault parameter settings instead of actual settings. Specify-dfto fold long lines for human readability (Postfix 2.9 and later).-eβ edit themain.cfconfiguration file, and update parameter settings with thename=valuepairs on thepostconf(1)command line.
With -M, edit the master.cf configuration file, and replace one or more service entries with new values as specified with service/type=value on the postconf(1) command line.
With -F, edit the master.cf configuration file, and replace one or more service fields with new values as specified with service/type/field=value on the postconf(1) command line. Currently, the "command" field contains the command name and the command arguments. This may change in the near future, so that the "command" field contains only the command name, and a new "arguments" pseudofield contains the command arguments.
With -P, edit the master.cf configuration file, and add or update one or more service parameter settings (-o parameter=value settings) with new values as specified with service/type/parameter=value on the postconf(1) command line.
In all cases the file is copied to a temporary file then renamed into place. Specify quotes to protect special characters and whitespace on the postconf(1) command line.
no cap, the -e option is no longer needed with Postfix version 2.8 and later, because it's assumed whenever a value is specified (empty or non-empty). so you can justβ¦ vibe and set things. π
-fβ fold long lines when printingmain.cformaster.cfconfiguration file entries, for human readability.
This feature is available with Postfix 2.9 and later.
-Fβ showmaster.cfper-entry field settings (by default all services and all fields), formatted asservice/type/field=value, one per line. Specify-Ffto fold long lines.
Specify one or more service/type/field instances on the postconf(1) command line to limit the output to fields of interest. Trailing parameter name or service type fields that are omitted will be handled as "*" wildcard fields.
This feature is available with Postfix 2.11 and later.
-hβ show parameter or attribute values without the"name = "label that normally precedes the value.-Hβ show parameter or attribute names without the" = value"that normally follows the name.
This feature is available with Postfix 3.1 and later.
-jβ JSON output. Formatmain.cformaster.cfsettings as one{"key": "value"}object per line.
This feature is available with Postfix 3.11 and later.
-lβ list the names of all supported mailbox locking methods. Postfix supports these:flockβ a kernel-based advisory locking method for local files only. This locking method is available on systems with a BSD compatible library.fcntlβ a kernel-based advisory locking method for local and remote files.dotlockβ an application-level locking method. An application locks a file named filename by creating a file named filename.lock. The application is expected to remove its own lock file, as well as stale lock files that were left behind after abnormal program termination.
-mβ list the names of all supported lookup table types. In Postfix configuration files, lookup tables are specified astype:name, where type is one of the types listed below. The table name syntax depends on the lookup table type as described in theDATABASE_READMEdocument.btreeβ a sorted, balanced tree structure. Available on systems with support for Berkeley DB databases.cdbβ a read-optimized structure with no support for incremental updates. Available on systems with support for CDB databases.
This feature is available with Postfix 2.2 and later.
cidrβ a table that associates values with Classless Inter-Domain Routing (CIDR) patterns. This is described incidr_table(5).
This feature is available with Postfix 2.2 and later.
dbmβ an indexed file type based on hashing. Available on systems with support for DBM databases.debugβ an adapter for another table that causes all accesses to be logged. The table name syntax istype:name. Example usage:debug:hash:/etc/postfix/example. The formats of the log messages are unspecified and subject to change.
β οΈ warning bestie: if a query or the underlying table contains sensitive information (such as a password), that information might be logged. π
This feature is available with Postfix 3.11 and later.
environβ the UNIX process environment array. The lookup key is the environment variable name; the table name is ignored. Originally implemented for testing, someone may find this useful someday.failβ a table that reliably fails all requests. The lookup table name is used for logging. This table exists to simplify Postfix error tests.
This feature is available with Postfix 2.9 and later.
hashβ an indexed file type based on hashing. Available on systems with support for Berkeley DB databases.inline(read-only) β a non-shared, in-memory lookup table. Example:"inline:{ key=value, { key = text with whitespace or comma }}". Key-value pairs are separated by whitespace or comma; with a key-value pair inside"{}", whitespace is ignored after the opening"{", around the"="between key and value, and before the closing"}". Inline tables eliminate the need to create a database file for just a few fixed elements. See also thestatic:map type.
This feature is available with Postfix 3.0 and later.
internalβ a non-shared, in-memory hash table. Its content are lost when a process terminates.lmdbβ OpenLDAP LMDB database (a memory-mapped, persistent file). Available on systems with support for LMDB databases. This is described inlmdb_table(5).
This feature is available with Postfix 2.11 and later.
ldap(read-only) β LDAP database client. This is described inldap_table(5).
memcacheβ Memcache database client. This one's detailed inmemcache_table(5). β¨ Available with Postfix 2.9 and later.mongodbβ MongoDB database client, described inmongodb_table(5). β¨ Available with Postfix 3.9 and later.mysql(read-only) β MySQL database client. Shows up on systems with support for MySQL databases. Described inmysql_table(5).pcre(read-only) β a lookup table built on Perl Compatible Regular Expressions. The file format lives inpcre_table(5).pgsql(read-only) β PostgreSQL database client, described inpgsql_table(5). β¨ Available with Postfix 2.1 and later.pipemap(read-only) β a lookup table that constructs a pipeline of tables. Example:"pipemap:{type_1:name_1, ..., type_n:name_n}". Everypipemap:query goes to the first table. Each lookup result becomes the query for the next table in the pipeline, and the last table produces the final result. The moment any table lookup produces no result, the pipeline produces no result. The first and last characters of thepipemap:table name must be{and}. Inside those, individual maps are separated with comma or whitespace. π¦ Available with Postfix 3.0 and later.proxyβ Postfixproxymap(8)client for shared access to Postfix databases. The table name syntax istype:name. β¨ Available with Postfix 2.0 and later.randmap(read-only) β an in-memory table that performs random selection. Example:"randmap:{result_1, ..., result_n}". Every table query returns a random choice from the results you listed. The first and last characters of therandmap:table name must be{and}. Inside those, individual results are separated with comma or whitespace. Want a specific result to have more weight? Just specify it multiple times π β¨ Available with Postfix 3.0 and later.regexp(read-only) β a lookup table based on regular expressions. The file format is described inregexp_table(5).sdbmβ an indexed file type based on hashing. Available on systems with support for SDBM databases. β¨ Available with Postfix 2.2 and later.socketmap(read-only) β Sendmail-style socketmap client. The table name isinet:host:port:namefor a TCP/IP server, orunix:pathname:namefor a UNIX-domain server. This one's described insocketmap_table(5). β¨ Available with Postfix 2.10 and later.sqlite(read-only) β SQLite database, described insqlite_table(5). β¨ Available with Postfix 2.8 and later.static(read-only) β a table that always returns its own name as the lookup result. Like,static:foobaralways returns the stringfoobaras the lookup result. When the result contains whitespace, say"static:{ text with whitespace }"β this form ignores whitespace after the opening{and before the closing}. Also go peep theinline:map π The form"static:{text}(yes, quoted exactly like upstream, unclosed quote and all π) is available with Postfix 3.0 and later.tcp(read-only) β TCP/IP client. The protocol is described intcp_table(5).texthash(read-only) β produces similar results ashash:files, except that you don't need to run thepostmap(1)command before you can use the file, and that it does not detect changes after the file is read. π«Ά Available with Postfix 2.8 and later.unionmap(read-only) β a table that sends every query to multiple lookup tables and concatenates all the found results, separated by comma. The table name syntax is the same as forpipemap. β¨ Available with Postfix 3.0 and later.unix(read-only) β a limited view of the UNIX authentication database. These tables are implemented:
Other table types may exist depending on how Postfix was built. π
β¨ OPTIONS β¨
-Mβ showmaster.cffile contents instead ofmain.cffile contents. Say-Mfto fold long lines for human readability. π
Then give it zero or more arguments, each with a service-name or a service-name/service-type pair, where service-name is the first field of a master.cf entry and service-type is one of (inet, unix, fifo, or pass).
If service-name or service-name/service-type is specified, only the matching master.cf entries will be output. For example, postconf -Mf smtp will output all services named smtp, and postconf -Mf smtp/inet will output only the smtp service that listens on the network. Trailing service type fields that are omitted will be handled as * wildcard fields.
β¨ Available with Postfix 2.9 and later. The syntax was changed from name.type to name/type, and * wildcard support was added with Postfix 2.11.
-nβ show only configuration parameters that have explicitname=valuesettings inmain.cf. Say-nfto fold long lines for human readability (Postfix 2.9 and later). To show settings that differ from built-in defaults only, use this bash syntax:
LANG=C comm -23 <(postconf -n) <(postconf -d)
Replace -23 with -12 to show settings that duplicate built-in defaults.
-o name=valueβ overridemain.cfparameter settings. This lets you see the effect changing a parameter would have when it is used in other configuration parameters, e.g.:
postconf -x -o stress=yes
β¨ Available with Postfix 2.10 and later.
-pβ showmain.cfparameter settings. This is the default. π Available with Postfix 2.11 and later.-Pβ showmaster.cfservice parameter settings (by default all services and all parameters), formatted as"service/type/parameter=value", one per line. Say-Pfto fold long lines.
Specify multiple -P options to also list service parameters that are not set in master.cf. This is useful with -x to evaluate the impact of master.cf overrides on other parameter settings.
Specify one or more "service/type/parameter" instances on the postconf(1) command line to limit the output to parameters of interest. Trailing parameter name or service type fields that are omitted will be handled as * wildcard fields.
β¨ Available with Postfix 2.11 and later.
-qβ do not log warnings for deprecated or unused parameters. π Available with Postfix 3.9 and later.-t [template_file]β display the templates for text that appears at the beginning of delivery status notification (DSN) messages, without expanding$nameexpressions.
To override the bounce_template_file parameter setting, specify a template file name at the end of the postconf -t command line. Specify an empty file name to display built-in templates (in shell language: "").
β¨ Available with Postfix 2.3 and later.
-T modeβ if Postfix is compiled without TLS support, the-Toption produces no output. Otherwise, if an invalid mode is specified, the-Toption reports an error and exits with a non-zero status code. The valid modes are:compile-versionβ output the OpenSSL version that Postfix was compiled with (i.e. the OpenSSL version in a header file). The output format is the same as with the commandopenssl version.run-versionβ output the OpenSSL version that Postfix is linked with at runtime (i.e. the OpenSSL version in a shared library).public-key-algorithmsβ output the lower-case names of the supported public-key algorithms, one per-line.
β¨ Available with Postfix 3.1 and later.
-vβ enable verbose logging for debugging purposes. Multiple-voptions make the software increasingly verbose. π-xβ expand$nameinmain.cformaster.cfparameter values. The expansion is recursive. β¨ Available with Postfix 2.10 and later.-Xβ edit themain.cfconfiguration file, and remove the parameters named on thepostconf(1)command line. Specify a list of parameter names, notname=valuepairs.
With -M, edit the master.cf configuration file, and remove one or more service entries as specified with "service/type" on the postconf(1) command line.
With -P, edit the master.cf configuration file, and remove one or more service parameter settings (-o parameter=value settings) as specified with "service/type/parameter" on the postconf(1) command line.
In all cases the file is copied to a temporary file then renamed into place. Specify quotes to protect special characters on the postconf(1) command line.
There is no postconf(1) command to perform the reverse operation, bestie β no undo button, no cap. π
β¨ Available with Postfix 2.10 and later. Support for -M and -P was added with Postfix 2.11.
-#β edit themain.cfconfiguration file, and comment out the parameters named on thepostconf(1)command line, so that those parameters revert to their default values. Specify a list of parameter names, notname=valuepairs.
With -M, you're editing the master.cf configuration file, and commenting out one or more service entries exactly as you spelled them out with service/type on the postconf(1) command line. π
In all cases the file is copied to a temporary file and then renamed into place. (Yes bestie, atomic-ish vibes β¨) Specify quotes to protect special characters on the postconf(1) command line β the shell will absolutely eat your * and $ if you don't. π«Ά
β οΈ There is no postconf(1) command to perform the reverse operation. You can comment out, but you cannot un-comment. That's a one-way street, no cap. π
This feature is available with Postfix 2.6 and later. Support for -M was added with Postfix 2.11. π
π©Ί DIAGNOSTICS
Problems are reported to the standard error stream. So yeah, if something's wrong, it goes to stderr β pipe it, redirect it, do what you gotta do. π
π± ENVIRONMENT
MAIL_CONFIGβ Directory with Postfix configuration files. That's where your config lives, periodt. π
βοΈ CONFIGURATION PARAMETERS
The following main.cf parameters are especially relevant to this program. π
The text below provides only a parameter summary. See postconf(5) for more details including examples. (Go read it, it's giving reference material fr fr π)
config_directory(seepostconf -doutput) β The default location of the Postfixmain.cfandmaster.cfconfiguration files.bounce_template_file(empty) β Pathname of a configuration file with bounce message templates.
π FILES
/etc/postfix/main.cf, Postfix configuration parameters/etc/postfix/master.cf, Postfix master daemon configuration
π SEE ALSO
bounce(5), bounce template file formatmaster(5),master.cfconfiguration file syntaxpostconf(5),main.cfconfiguration file syntax
π README FILES
Use postconf readme_directory or postconf html_directory to locate this information. (Iconic little trick, iykyk π§)
DATABASE_README, Postfix lookup table overview
π LICENSE
The Secure Mailer license must be distributed with this software. Not optional, bestie. π«‘
π AUTHOR(S)
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA
Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA
And that's a wrap on the POSTCONF(1) page β Postfix's very own postconf(1), from the Postfix distribution. π Go touch grass, then go fix your main.cf. Byeee π¦β¨
π¦ where this page comes from
- alpine 3.24: postfix-doc 3.11.7-r0 Β· IPL-1.0 EPL-2.0
- arch rolling: postfix 3.11.7-1 Β· EPL-2.0 OR IPL-1.0 AND BSD-4-Clause-UC
- nixos 26.05: postfix 3.11.7
- nixpkgs unstable: postfix 3.11.7
- ubuntu stonking: postfix 3.11.7-1ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms