# man > postconf(1)

> **TLDR:** Postfix configuration utility.
>
- Specify the directory of the `main.cf` configuration file instead of the default configuration directory:
  `postconf -c {{path/to/configuration_directory}}`
- Edit the `main.cf` configuration file and update parameter settings with the "name=value" pairs:
  `postconf -e`
- Print the default parameter settings of the `main.cf` instead of the actual settings:
  `postconf -d`
- Display parameters only from the specified class:
  `postconf -C {{builtin|service|user|all}}`
- List available SASL plug-in types for the Postfix SMTP server. The plug-in type is selected with the `smtpd_sasl_type` configuration parameter by specifying `cyrus` or `dovecot` as the name:
  `postconf -a`
- List the names of all supported lookup table types. Lookup tables are specified as `type:name` in configuration files where the type can be `btree`, `cdb`, `hash`, `mysql`, etc:
  `postconf -m`

*Source: tldr-pages*

---

[_POSTCONF_(1)](https://www.chedong.com/phpMan.php/man/POSTCONF/1/markdown)                            General Commands Manual                           [_POSTCONF_(1)](https://www.chedong.com/phpMan.php/man/POSTCONF/1/markdown)

## NAME
       postconf - Postfix configuration utility

## SYNOPSIS
### Managing main.cf:

       **postconf **[**-dfhHnopvx**] [**-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 **[**-fhHovx**] [**-c _**config_dir_] [_service_[**/_**type_[**/_**field_]] _..._]

       **postconf -F **[**-ev**] [**-c _**config_dir_] _service_**/_**type_**/_**field_**=_**value_ _..._

### Managing master.cf service parameters:

       **postconf -P **[**-fhHovx**] [**-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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command displays the values of **main.cf **configuration parameters,
       and warns about possible mis-typed parameter names (Postfix 2.9 and later).  The command  can
       also  change  **main.cf **configuration parameter values, or display other configuration informa‐
       tion about the Postfix mail system.

       Options:

### -a     
              selected with the **smtpd_sasl_type **configuration parameter by  specifying  one  of  the
              names listed below.

              **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 is available
                     when Postfix is built with any form of SASL support.

              This feature is available with Postfix 2.3 and later.

### -A     
              is  selected  with  the  **smtp_sasl_type  **or **lmtp_sasl_type **configuration parameters by
              specifying one of the names listed below.

              **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 
              Display the message text that appears at the beginning of delivery status notification
              (DSN) messages, expanding  $**name  **expressions  with  actual  values  as  described  in
              [**bounce**(5)](https://www.chedong.com/phpMan.php/man/bounce/5/markdown).

              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.

### -c _
              The  **main.cf  **configuration file is in the named directory instead of the default con‐
              figuration directory.

### -C _
              When  displaying  **main.cf  **parameters,  select  only  parameters  from  the  specified
              class(es):

              **builtin**
                     Parameters with built-in names.

              **service**
                     Parameters  with  service-defined  names  (the first field of a **master.cf **entry
                     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      -df  
              fold long lines for human readability (Postfix 2.9 and later).

### -e     
              "_name=value_" pairs on the [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command line.

              With **-M**, edit the **master.cf **configuration file, and replace one or  more  service  en‐
              tries  with  new values as specified with "_service/type=value_" on the [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) com‐
              mand 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown)  com‐
              mand  line. Currently, the "command" field contains the command name and command argu‐
              ments.  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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command line.

              The **-e **option is no longer needed with Postfix version 2.8 and later, as it is assumed
              whenever a value is specified (empty or non-empty).

### -f     
              man readability.

              This feature is available with Postfix 2.9 and later.

### -F     
              matted as "_service/type/field=value_", one per line. Specify **-Ff **to fold long lines.

              Specify one or more "_service/type/field_" instances on the [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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     
              the value.

### -H     
              name.

              This feature is available with Postfix 3.1 and later.

### -l     
              ing methods:

              **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  ab‐
                     normal program termination.

### -m     
              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  DATA‐
              BASE_README document.

              **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) pat‐
                     terns. This is described in [**cidr_table**(5)](https://www.chedong.com/phpMan.php/man/cidrtable/5/markdown).

                     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.

              **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 the _static:_ 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 termi‐
                     nates.

              **lmdb   **OpenLDAP LMDB database (a memory-mapped, persistent file).  Available  on  sys‐
                     tems with support for LMDB databases.  This is described in [**lmdb_table**(5)](https://www.chedong.com/phpMan.php/man/lmdbtable/5/markdown).

                     This feature is available with Postfix 2.11 and later.

              **ldap **(read-only)
                     LDAP database client. This is described in [**ldap_table**(5)](https://www.chedong.com/phpMan.php/man/ldaptable/5/markdown).

              **memcache**
                     Memcache database client. This is described in [**memcache_table**(5)](https://www.chedong.com/phpMan.php/man/memcachetable/5/markdown).

                     This feature is available with Postfix 2.9 and later.

              **mysql **(read-only)
                     MySQL  database client.  Available on systems with support for MySQL databases.
                     This is described in [**mysql_table**(5)](https://www.chedong.com/phpMan.php/man/mysqltable/5/markdown).

              **pcre **(read-only)
                     A lookup table based on Perl Compatible Regular Expressions.  The  file  format
                     is described in [**pcre_table**(5)](https://www.chedong.com/phpMan.php/man/pcretable/5/markdown).

              **pgsql **(read-only)
                     PostgreSQL database client. This is described in [**pgsql_table**(5)](https://www.chedong.com/phpMan.php/man/pgsqltable/5/markdown).

                     This feature is 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_**}**".  Each "pipemap:" query is given
                     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.   When  any  table
                     lookup  produces no result, the pipeline produces no result. The first and last
                     characters of the "pipemap:" table name must be "**{**" and "**}**".  Within these, in‐
                     dividual maps are separated with comma or whitespace.

                     This feature is available with Postfix 3.0 and later.

              **proxy  **Postfix [**proxymap**(8)](https://www.chedong.com/phpMan.php/man/proxymap/8/markdown) client for shared access to Postfix  databases.  The  table
                     name syntax is _type_**:_**name_.

                     This feature is available with Postfix 2.0 and later.

              **randmap **(read-only)
                     An in-memory table that performs random selection. Example: "**randmap:{_**result_1,_
                     _...,_  _result_n_**}**".  Each  table query returns a random choice from the specified
                     results. The first and last characters of the "randmap:" table name must be "**{**"
                     and "**}**".  Within these, individual results are separated with comma  or  white‐
                     space. To give a specific result more weight, specify it multiple times.

                     This feature is available with Postfix 3.0 and later.

              **regexp **(read-only)
                     A  lookup  table  based on regular expressions. The file format is described in
                     [**regexp_table**(5)](https://www.chedong.com/phpMan.php/man/regexptable/5/markdown).

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

                     This feature is available with Postfix 2.2 and later.

              **socketmap **(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  de‐
                     scribed in [**socketmap_table**(5)](https://www.chedong.com/phpMan.php/man/socketmaptable/5/markdown).

                     This feature is available with Postfix 2.10 and later.

              **sqlite **(read-only)
                     SQLite database. This is described in [**sqlite_table**(5)](https://www.chedong.com/phpMan.php/man/sqlitetable/5/markdown).

                     This feature is available with Postfix 2.8 and later.

              **static **(read-only)
                     A table that always returns its name as lookup result. For example, **static:foo‐**
                     **bar  **always  returns the string **foobar **as lookup result. Specify "**static:{ _**text_
                     _with_ _whitespace_ **}**" when the  result  contains  whitespace;  this  form  ignores
                     whitespace  after  the opening "**{**" and before the closing "**}**". See also the _in‐_
                     _line:_ map.

                     The form "**static:{_**text_**} **is available with Postfix 3.0 and later.

              **tcp **(read-only)
                     TCP/IP client. The protocol is described in [**tcp_table**(5)](https://www.chedong.com/phpMan.php/man/tcptable/5/markdown).

              **texthash **(read-only)
                     Produces similar results as hash: files, except that you don't need to run  the
                     [**postmap**(1)](https://www.chedong.com/phpMan.php/man/postmap/1/markdown)  command  before  you  can use the file, and that it does not detect
                     changes after the file is read.

                     This feature is available with Postfix 2.8 and later.

              **unionmap **(read-only)
                     A table that sends each query to multiple lookup tables and  that  concatenates
                     all  found  results,  separated by comma.  The table name syntax is the same as
                     for **pipemap**.

                     This feature is available with Postfix 3.0 and later.

              **unix **(read-only)
                     A limited view of the UNIX authentication database. The  following  tables  are
                     implemented:

                     **unix:passwd.byname**
                            The  table  is the UNIX password database. The key is a login name.  The
                            result is a password file entry in [**passwd**(5)](https://www.chedong.com/phpMan.php/man/passwd/5/markdown) format.

                     **unix:group.byname**
                            The table is the UNIX group database. The key is a group name.  The  re‐
                            sult is a group file entry in [**group**(5)](https://www.chedong.com/phpMan.php/man/group/5/markdown) format.

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

### -M      -Mf 
              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 lis‐
              tens 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.

### -n     
              Specify  **-nf **to fold long lines for human readability (Postfix 2.9 and later). To show
              settings that differ from built-in defaults only, use the following bash syntax:
                  LANG=C comm -23 <(postconf -n) <(postconf -d)
              Replace "-23" with "-12" to show settings that duplicate built-in defaults.

### -o _
              Override **main.cf **parameter settings.  This lets you see the effect changing a  parame‐
              ter would have when it is used in other configuration parameters, e.g.:
                  postconf -x -o stress=yes

              This feature is available with Postfix 2.10 and later.

### -p     

              This feature is available with Postfix 2.11 and later.

### -P     
              ters), formatted as "_service/type/parameter=value_", one per line.  Specify **-Pf **to fold
              long lines.

              Specify one or more "_service/type/parameter_" instances on the [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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.

### -t 
              Display  the templates for text that appears at the beginning of delivery status noti‐
              fication (DSN) messages, without expanding $**name **expressions.

              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: "").

              This feature is available with Postfix 2.3 and later.

### -T _
              If Postfix is compiled without TLS support, the **-T **option produces no output.   Other‐
              wise, if an invalid _mode_ is specified, the **-T **option 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  command
                     "**openssl 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.

              This feature is available with Postfix 3.1 and later.

### -v      -v 
              increasingly verbose.

### -x     

              This feature is available with Postfix 2.10 and later.

### -X     
              [**conf**(1)](https://www.chedong.com/phpMan.php/man/conf/1/markdown) 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command line.

              With **-P**, edit the **master.cf **configuration file, and remove one or more service parame‐
              ter  settings (-o parameter=value settings) as specified with "_service/type/parameter_"
              on the [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command line.

              There is no [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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.

       **-#     **Edit the **main.cf **configuration file, and comment out the parameters named on the **post‐**
              [**conf**(1)](https://www.chedong.com/phpMan.php/man/conf/1/markdown) command line, so that those parameters revert to their default values.   Spec‐
              ify 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) command line.

              There is no [**postconf**(1)](https://www.chedong.com/phpMan.php/man/postconf/1/markdown) 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
       **MAIL_CONFIG**
              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)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown) for more details  including
       examples.

### config_directory (see 'postconf -d' output)
              The default location of the Postfix main.cf and master.cf configuration 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)](https://www.chedong.com/phpMan.php/man/bounce/5/markdown), bounce template file format
       [master(5)](https://www.chedong.com/phpMan.php/man/master/5/markdown), master.cf configuration file syntax
       [postconf(5)](https://www.chedong.com/phpMan.php/man/postconf/5/markdown), 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

       Wietse Venema
       Google, Inc.
       111 8th Avenue
       New York, NY 10011, USA

                                                                                         [_POSTCONF_(1)](https://www.chedong.com/phpMan.php/man/POSTCONF/1/markdown)
