doc/web/source/installation/postfix_configuration.rst
changeset 760 b678a1c43027
parent 748 659c4476c57c
child 761 e4e656f19771
equal deleted inserted replaced
748:659c4476c57c 760:b678a1c43027
     1 =====================
       
     2 Postfix configuration
       
     3 =====================
       
     4 This page mentions all Postfix configuration parameters, which have to be
       
     5 modified and/or added in/to the Postfix :file:`main.cf`.
       
     6 
       
     7 main.cf
       
     8 -------
       
     9 Add or replace the following configuration parameters in the global Postfix
       
    10 configuration file.
       
    11 The Postfix PostgreSQL client configuration files (:file:`pgsql-{*}.cf`)
       
    12 mentioned below will be created when vmm will be installed.
       
    13 
       
    14 .. code-block:: text
       
    15 
       
    16  sql      = pgsql:${config_directory}/
       
    17  proxysql = proxy:${sql}
       
    18 
       
    19  # relocated users from the database
       
    20  #relocated_maps = ${proxysql}pgsql-relocated_maps.cf
       
    21  
       
    22  # transport settings from our database
       
    23  transport_maps = ${proxysql}pgsql-transport_maps.cf
       
    24  
       
    25  # virtual domains, mailboxes and aliases
       
    26  virtual_mailbox_domains = ${proxysql}pgsql-virtual_mailbox_domains.cf
       
    27  virtual_alias_maps = ${proxysql}pgsql-virtual_alias_maps.cf
       
    28  virtual_minimum_uid = 70000
       
    29  virtual_uid_maps = ${sql}pgsql-virtual_uid_maps.cf
       
    30  virtual_gid_maps = ${sql}pgsql-virtual_gid_maps.cf
       
    31  virtual_mailbox_base = /
       
    32  virtual_mailbox_maps = ${proxysql}pgsql-virtual_mailbox_maps.cf
       
    33  
       
    34  # dovecot LDA (only recommended with Dovecot v1.x)
       
    35  #dovecot_destination_recipient_limit = 1
       
    36  #virtual_transport = dovecot:
       
    37  
       
    38  # dovecot lmtp (requires Dovecot ≧ v2.0.0)
       
    39  virtual_transport = lmtp:unix:private/dovecot-lmtp
       
    40  
       
    41  # dovecot SASL
       
    42  smtpd_sasl_type = dovecot
       
    43  smtpd_sasl_path = private/dovecot-auth
       
    44  smtpd_sasl_auth_enable = yes
       
    45  # Keep smtpd_sasl_local_domain identical to Dovecot's auth_default_realm:
       
    46  # empty. Both are empty by default. Let it commented out.
       
    47  # Read more at: http://wiki2.dovecot.org/Authentication/Mechanisms/DigestMD5
       
    48  #smtpd_sasl_local_domain =
       
    49  smtpd_sasl_security_options = noplaintext, noanonymous
       
    50  #broken_sasl_auth_clients = yes
       
    51 
       
    52  smtpd_recipient_restrictions =
       
    53   permit_mynetworks
       
    54   permit_sasl_authenticated
       
    55   reject_unauth_destination
       
    56 
       
    57 master.cf
       
    58 ---------
       
    59 .. note:: This step is only necessary if you are still using Dovecot v\ **1**.x
       
    60 
       
    61 Add the service `dovecot` to Postfix's master process configuration file.
       
    62 Append this lines:
       
    63 
       
    64 .. code-block:: text
       
    65 
       
    66  dovecot   unix  -       n       n       -       -       pipe
       
    67   flags=DORhu user=nobody argv=/usr/local/lib/dovecot/deliver -f ${sender}
       
    68   -d ${user}@${nexthop} -n -m ${extension}
       
    69 
       
    70 The command of the `argv` attribute points to the
       
    71 :ref:`root SETUID copy of deliver <root-setuid-copy-of-deliver>`.
       
    72 For more details about the `flags` used above see: `pipe(8)`_.
       
    73 All other arguments are explained in the Dovecot LDA_ documentation.
       
    74 
       
    75 Using Dovecot's LMTP
       
    76 --------------------
       
    77 In order to use Dovecot's LMTP_ as `virtual_transport` with Postfix make sure
       
    78 you have have:
       
    79 
       
    80  ‣ `lmtp` in your `protocols` setting (:ref:`dovecot2.conf`)
       
    81  ‣ configured a `lmtp` listener: `service lmtp {}`
       
    82    (:ref:`conf-d-10-master.conf`)
       
    83  ‣ set `lmtp:unix:private/dovecot-lmtp` as the `domain.transport` in your
       
    84    :file:`vmm.cfg`.
       
    85 
       
    86 If you want to switch the transport of existing domains and/or accounts, you
       
    87 can use the subcommands :ref:`domaintransport` and :ref:`usertransport`.
       
    88 
       
    89 .. include:: ../ext_references.rst