## NAME

postconf - Postfix configuration utility

## SYNOPSIS

Managing main.cf:

postconf [-dfhnopvx] [-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 [-fovx] [-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 [-fovx] [-c config_dir] [service[/type[/field]] ...]

postconf -F [-ev] [-c config_dir] service/type/field=value ...

Managing master.cf service parameters:

postconf -P [-fovx] [-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 other configuration:

postconf -a|-A|-l|-m [-v] [-c config_dir]

## DESCRIPTION

By default, the postconf(1) command displays the values of main.cf configuration parameters, and warns about possible mis-typed parameter names (Postfix 2.9 and later). It can also change main.cf configuration parameter values, or display other configuration information about the Postfix mail system.

Options:

\fB-a\fR

List the available SASL server plug-in types. The SASL plug-in type is selected with the smtpd_sasl_type configuration parameter by specifying one of the names listed below.

\fBcyrus\fR

This server plug-in is available when Postfix is built with Cyrus SASL support.

\fBdovecot\fR

This server plug-in uses the Dovecot authentication server, and is available when Postfix is built with any form of SASL support.

This feature is available with Postfix 2.3 and later.

\fB-A\fR

List the available SASL client plug-in types. The SASL plug-in type is selected with the smtp_sasl_type or lmtp_sasl_type configuration parameters by specifying one of the names listed below.

\fBcyrus\fR

This client plug-in is available when Postfix is built with Cyrus SASL support.

This feature is available with Postfix 2.3 and later.

\fB-b\fR [\fItemplate_file\fR]

Display the message text that appears at the beginning of delivery status notification (DSN) messages, replacing $name expressions with actual values as described in bounce(5).

To override the built-in templates, specify a template file name at the end of the postconf(1) command line, or specify a file name in main.cf with the bounce_template_file parameter.

To force selection of the built-in templates, specify an empty template file name on the postconf(1) command line (in shell language: "").

This feature is available with Postfix 2.3 and later.

\fB-c \fIconfig_dir\fR

The main.cf configuration file is in the named directory instead of the default configuration directory.

\fB-C \fIclass,...\fR

When displaying main.cf parameters, select only parameters from the specified class(es):

\fBbuiltin\fR

Parameters with built-in names.

\fBservice\fR

Parameters with service-defined names (the first field of a master.cf entry plus a Postfix-defined suffix).

\fBuser\fR

Parameters with user-defined names.

\fBall\fR

All the above classes.

The default is as if "-C all" is specified.

This feature is available with Postfix 2.9 and later.

\fB-d\fR

Print main.cf default parameter settings instead of actual settings. Specify -df to fold long lines for human readability (Postfix 2.9 and later).

\fB-e\fR

Edit the main.cf configuration file, and update parameter settings with the "name=value" pairs on the postconf(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 specied with "service/type/field=value" on the postconf(1) command line. Currently, the "command" field contains the command name and 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 specied 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.

The -e option is no longer needed with Postfix version 2.8 and later.

\fB-f\fR

Fold long lines when printing main.cf or master.cf configuration file entries, for human readability.

This feature is available with Postfix 2.9 and later.

\fB-F\fR

Show master.cf per-entry field settings (by default all services and all fields), formatted as one "service/type/field=value" per line. Specify -Ff to 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.

\fB-h\fR

Show parameter or attribute values without the "name = " label that normally precedes the value.

\fB-l\fR

List the names of all supported mailbox locking methods. Postfix supports the following methods:

\fBflock\fR

A kernel-based advisory locking method for local files only. This locking method is available on systems with a BSD compatible library.

\fBfcntl\fR

A kernel-based advisory locking method for local and remote files.

\fBdotlock\fR

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.

\fB-m\fR

List the names of all supported lookup table types. In Postfix configuration files, lookup tables are specified as type:name, where type is one of the types listed below. The table name syntax depends on the lookup table type as described in the DATABASE_README document.

\fBbtree\fR

A sorted, balanced tree structure. Available on systems with support for Berkeley DB databases.

\fBcdb\fR

A read-optimized structure with no support for incremental updates. Available on systems with support for CDB databases.

\fBcidr\fR

A table that associates values with Classless Inter-Domain Routing (CIDR) patterns. This is described in cidr_table(5).

\fBdbm\fR

An indexed file type based on hashing. Available on systems with support for DBM databases.

\fBenviron\fR

The UNIX process environment array. The lookup key is the variable name. Originally implemented for testing, someone may find this useful someday.

\fBfail\fR

A table that reliably fails all requests. The lookup table name is used for logging. This table exists to simplify Postfix error tests.

\fBhash\fR

An indexed file type based on hashing. Available on systems with support for Berkeley DB databases.

\fBinternal\fR

A non-shared, in-memory hash table. Its content are lost when a process terminates.

\fBlmdb\fR

OpenLDAP LMDB database (a memory-mapped, persistent file). Available on systems with support for LMDB databases. This is described in lmdb_table(5).

\fBldap\fR (read-only)

LDAP database client. This is described in ldap_table(5).

\fBmemcache\fR

Memcache database client. This is described in memcache_table(5).

\fBmysql\fR (read-only)

MySQL database client. Available on systems with support for MySQL databases. This is described in mysql_table(5).

\fBpcre\fR (read-only)

A lookup table based on Perl Compatible Regular Expressions. The file format is described in pcre_table(5).

\fBpgsql\fR (read-only)

PostgreSQL database client. This is described in pgsql_table(5).

\fBproxy\fR

Postfix proxymap(8) client for shared access to Postfix databases. The table name syntax is type:name.

\fBregexp\fR (read-only)

A lookup table based on regular expressions. The file format is described in regexp_table(5).

\fBsdbm\fR

An indexed file type based on hashing. Available on systems with support for SDBM databases.

\fBsocketmap\fR (read-only)

Sendmail-style socketmap client. The table name is inet:host:port:name for a TCP/IP server, or unix:pathname:name for a UNIX-domain server. This is described in socketmap_table(5).

\fBsqlite\fR (read-only)

SQLite database. This is described in sqlite_table(5).

\fBstatic\fR (read-only)

A table that always returns its name as lookup result. For example, static:foobar always returns the string foobar as lookup result.

\fBtcp\fR (read-only)

TCP/IP client. The protocol is described in tcp_table(5).

\fBtexthash\fR (read-only)

Produces similar results as hash: files, except that you don't need to run the postmap(1) command before you can use the file, and that it does not detect changes after the file is read.

\fBunix\fR (read-only)

A limited view of the UNIX authentication database. The following tables are implemented:

The table is the UNIX password database. The key is a login name. The result is a password file entry in passwd(5) format.

\fBunix:group.byname\fR

The table is the UNIX group database. The key is a group name. The result is a group file entry in group(5) format.

Other table types may exist depending on how Postfix was built.

\fB-M\fR

Show master.cf file contents instead of main.cf file contents. Specify -Mf to fold long lines for human readability.

Specify zero or more arguments, each with a service-name or 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.

This feature is 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.

\fB-n\fR

Show only configuration parameters that have explicit name=value settings in main.cf. Specify -nf to fold long lines for human readability (Postfix 2.9 and later).

\fB-o \fIname=value\fR

Override main.cf parameter settings.

This feature is available with Postfix 2.10 and later.

\fB-p\fR

Show main.cf parameter settings. This is the default.

This feature is available with Postfix 2.11 and later.

\fB-P\fR

Show master.cf service parameter settings (by default all services and all parameters). formatted as one "service/type/parameter=value" per line. Specify -Pf to fold long lines.

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.

This feature is available with Postfix 2.11 and later.

\fB-t\fR [\fItemplate_file\fR]

Display the templates for text that appears at the beginning of delivery status notification (DSN) messages, without expanding $name expressions.

To override the built-in templates, specify a template file name at the end of the postconf(1) command line, or specify a file name in main.cf with the bounce_template_file parameter.

To force selection of the built-in templates, specify an empty template file name on the postconf(1) command line (in shell language: "").

This feature is available with Postfix 2.3 and later.

\fB-v\fR

Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.

\fB-x\fR

Expand $name in main.cf or master.cf parameter values. The expansion is recursive.

This feature is available with Postfix 2.10 and later.

\fB-X\fR

Edit the main.cf configuration file, and remove the parameters named on the postconf(1) command line. Specify a list of parameter names, not "name=value" pairs.

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 specied 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.

This feature is available with Postfix 2.10 and later. Support for -M and -P was added with Postfix 2.11.

\fB-#\fR

Edit the main.cf configuration file, and comment out the parameters named on the postconf(1) command line, so that those parameters revert to their default values. Specify a list of parameter names, not "name=value" pairs.

With -M, edit the master.cf configuration file, and comment out one or more service entries as specified with "service/type" 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.

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.

## ENVIRONMENT

\fBMAIL_CONFIG\fR

Directory with Postfix configuration files.

## 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.

\fBconfig_directory (see 'postconf -d' output)\fR

The default location of the Postfix main.cf and master.cf configuration files.

\fBbounce_template_file (empty)\fR

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 format master(5), master.cf
    configuration file syntax postconf(5), main.cf configuration
    file syntax

## README FILES

Use "postconf readme_directory" or "postconf html_directory" to locate this information.

    DATABASE_README, Postfix lookup table overview

## LICENSE

The Secure Mailer license must be distributed with this software.

## AUTHOR(S)

    Wietse Venema
    IBM T.J. Watson Research
    P.O. Box 704
    Yorktown Heights, NY 10598, USA