Configure.Dovecot_2
changeset 571 a4aead244f75
parent 564 55148bc6348e
child 632 152ea3e3e955
equal deleted inserted replaced
465:c0e1fb1b0145 571:a4aead244f75
       
     1 # This document contains a minimal configuration for a vmm setup with
       
     2 # Dovecot v2.x.
       
     3 #
       
     4 # You could save this file as local.conf in the dovecot configuration directory
       
     5 # (commonly /etc/dovecot or /usr/local/etc/dovecot).
       
     6 # When you want to use this file as your configuration file for Dovecot, make
       
     7 # sure you have commented out the line "!include conf.d/*.conf". The last line
       
     8 # "!include_try local.conf" is sufficient.
       
     9 #
       
    10 # Otherwise you have to apply the following settings to the configuration files
       
    11 # in the conf.d directory.
       
    12 
       
    13 ### 
       
    14 #  dovecot.conf
       
    15 ###
       
    16 protocols = imap lmtp
       
    17 # uncomment if your users should be able to manage their sieve scripts
       
    18 #protocols = imap lmtp sieve
       
    19 
       
    20 # uncomment if you want to use the quota plugin
       
    21 #dict {
       
    22 #  quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext
       
    23 #}
       
    24 
       
    25 ###
       
    26 # conf.d/10-auth.conf
       
    27 ###
       
    28 auth_mechanisms = plain login cram-md5
       
    29 passdb {
       
    30   driver = sql
       
    31   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
       
    32 }
       
    33 userdb {
       
    34   driver = sql
       
    35   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
       
    36 }
       
    37 #!include auth-system.conf.ext
       
    38 
       
    39 ###
       
    40 # conf.d/10-mail.conf
       
    41 ###
       
    42 first_valid_gid = 70000
       
    43 first_valid_uid = 70000
       
    44 mail_access_groups = dovemail
       
    45 mail_location = maildir:~/Maildir
       
    46 
       
    47 # uncomment if you want to use the quota plugin
       
    48 #mail_plugins = quota
       
    49 
       
    50 ###
       
    51 # conf.d/10-master.conf
       
    52 ###
       
    53 
       
    54 # if you don't want to use secure imap, you have to disable the imaps listener
       
    55 ##service imap-login {
       
    56 ##  inet_listener imaps {
       
    57 ##    port = 0
       
    58 ##  }
       
    59 ##}
       
    60 
       
    61 service lmtp {
       
    62   unix_listener /var/spool/postfix/private/dovecot-lmtp {
       
    63     user = postfix
       
    64     group = postfix
       
    65     mode = 0600
       
    66   }
       
    67 }
       
    68 
       
    69 service auth {
       
    70   user = doveauth
       
    71   unix_listener auth-userdb {
       
    72   }
       
    73   unix_listener /var/spool/postfix/private/dovecot-auth {
       
    74     user = postfix
       
    75     group = postfix
       
    76     mode = 0600
       
    77   }
       
    78 }
       
    79 
       
    80 service auth-worker {
       
    81   unix_listener auth-worker {
       
    82     user = doveauth
       
    83     group = $default_internal_user
       
    84     mode = 0660
       
    85   }
       
    86   user = doveauth
       
    87 }
       
    88 
       
    89 service dict {
       
    90   unix_listener dict {
       
    91     group = dovemail
       
    92     mode = 0660
       
    93   }
       
    94 }
       
    95 
       
    96 ###
       
    97 # conf.d/10-ssl.conf
       
    98 ###
       
    99 # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
       
   100 #ssl = yes
       
   101 
       
   102 ssl_cert = </etc/ssl/certs/dovecot.pem
       
   103 ssl_key = </etc/ssl/private/dovecot.pem
       
   104 
       
   105 # if you want to disable SSL/TLS, you have set 'ssl = no' and disable the
       
   106 # imaps listener in conf.d/10-master.conf
       
   107 
       
   108 ###
       
   109 # conf.d/15-lda.conf
       
   110 ###
       
   111 postmaster_address = postmaster@YOUR-DOMAIN.TLD
       
   112 recipient_delimiter = +
       
   113 protocol lda {
       
   114   # uncomment if you want to use the quota plugin
       
   115   #mail_plugins = $mail_plugins
       
   116   # uncomment if you want to use the quota and sieve plugins
       
   117   #mail_plugins = $mail_plugins sieve
       
   118 }
       
   119 
       
   120 ###
       
   121 # conf.d/20-imap.conf
       
   122 ###
       
   123 protocol imap {
       
   124   # uncomment if you want to use the quota plugin
       
   125   #mail_plugins = $mail_plugins imap_quota
       
   126 }
       
   127 
       
   128 ###
       
   129 # conf.d/20-lmtp.conf
       
   130 ###
       
   131 protocol lmtp {
       
   132   # uncomment if you want to use the quota plugin
       
   133   #mail_plugins = $mail_plugins
       
   134   # uncomment if you want to use the quota and sieve plugins
       
   135   #mail_plugins = $mail_plugins sieve
       
   136 }
       
   137 
       
   138 ###
       
   139 # conf.d/90-quota.conf
       
   140 ###
       
   141 # uncomment if you want to use the quota plugin
       
   142 #plugin {
       
   143 #  quota = dict:user:%{uid}::proxy::quota
       
   144 #  quota_rule = *:storage=0:messages=0
       
   145 #  quota_rule2 = Trash:storage=+100M
       
   146 #}
       
   147 
       
   148 ###
       
   149 # conf.d/90-sieve.conf
       
   150 ###
       
   151 # uncomment if you want to use sieve (and maybe managesieve)
       
   152 #plugin {
       
   153 #  recipient_delimiter = +
       
   154 #  sieve = ~/.dovecot.sieve
       
   155 #  sieve_dir = ~/sieve
       
   156 #}
       
   157 
       
   158 ###############################################################################
       
   159 #			    end of local configuration			      #
       
   160 ###############################################################################
       
   161 
       
   162 
       
   163 ###
       
   164 # etc/dovecot/dovecot-sql.conf.ext
       
   165 ###
       
   166 # apply this settings to your dovecot-sql.conf.ext
       
   167 
       
   168 #driver = pgsql
       
   169 #connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
       
   170 #
       
   171 #password_query = \
       
   172 # SELECT userid AS "user", password FROM dovecotpassword('%Ln', '%Ld') WHERE %Ls
       
   173 #
       
   174 ## uncomment this user_query if you want to use the quota plugin
       
   175 #user_query = \
       
   176 # SELECT home, uid, gid, mail, quota_rule FROM dovecotquotauser('%Ln', '%Ld')
       
   177 ## otherwise uncomment the following user_query
       
   178 #user_query = SELECT home, uid, gid, mail FROM dovecotuser('%Ln', '%Ld')
       
   179 #
       
   180 #iterate_query = \
       
   181 # SELECT local_part AS username, domain_name.domainname AS domain \
       
   182 #   FROM users \
       
   183 #        LEFT JOIN domain_data USING (gid) \
       
   184 #        LEFT JOIN domain_name USING (gid)
       
   185 
       
   186 
       
   187 ###
       
   188 # etc/dovecot/dovecot-dict-sql.conf.ext
       
   189 ###
       
   190 # if you want to use the quota plugin add this lines to your
       
   191 #  dovecot-dict-sql.conf.ext
       
   192 
       
   193 #connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
       
   194 #map {
       
   195 #  pattern = priv/quota/storage
       
   196 #  table = userquota
       
   197 #  username_field = uid
       
   198 #  value_field = bytes
       
   199 #}
       
   200 #map {
       
   201 #  pattern = priv/quota/messages
       
   202 #  table = userquota
       
   203 #  username_field = uid
       
   204 #  value_field = messages
       
   205 #}