Configure.Dovecot_2
branchv0.6.x
changeset 562 b5bb7b34e831
child 564 55148bc6348e
equal deleted inserted replaced
561:b0165b7af7a3 562:b5bb7b34e831
       
     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_location = maildir:~/Maildir
       
    45 
       
    46 # uncomment if you want to use the quota plugin
       
    47 #mail_plugins = quota
       
    48 
       
    49 ###
       
    50 # conf.d/10-master.conf
       
    51 ###
       
    52 
       
    53 # if you don't want to use secure imap, you have to disable the imaps listener
       
    54 ##service imap-login {
       
    55 ##  inet_listener imaps {
       
    56 ##    port = 0
       
    57 ##  }
       
    58 ##}
       
    59 
       
    60 service lmtp {
       
    61   unix_listener /var/spool/postfix/private/dovecot-lmtp {
       
    62     user = postfix
       
    63     group = postfix
       
    64     mode = 0600
       
    65   }
       
    66 }
       
    67 
       
    68 service auth {
       
    69   user = nobody
       
    70   unix_listener auth-userdb {
       
    71   }
       
    72   unix_listener /var/spool/postfix/private/dovecot-auth {
       
    73     user = postfix
       
    74     group = postfix
       
    75     mode = 0600
       
    76   }
       
    77 }
       
    78 
       
    79 service auth-worker {
       
    80   unix_listener auth-worker {
       
    81     user = nobody
       
    82     group = $default_internal_user
       
    83     mode = 0660
       
    84   }
       
    85   user = nobody
       
    86 }
       
    87 
       
    88 service dict {
       
    89   unix_listener dict {
       
    90     # we need mode 0666, because we have a GID/domain and a UID/user
       
    91     mode = 0666
       
    92   }
       
    93 }
       
    94 
       
    95 ###
       
    96 # conf.d/10-ssl.conf
       
    97 ###
       
    98 # SSL/TLS support: yes, no, required. <doc/wiki/SSL.txt>
       
    99 #ssl = yes
       
   100 
       
   101 ssl_cert = </etc/ssl/certs/dovecot.pem
       
   102 ssl_key = </etc/ssl/private/dovecot.pem
       
   103 
       
   104 # if you want to disable SSL/TLS, you have set 'ssl = no' and disable the
       
   105 # imaps listener in conf.d/10-master.conf
       
   106 
       
   107 ###
       
   108 # conf.d/15-lda.conf
       
   109 ###
       
   110 postmaster_address = postmaster@YOUR-DOMAIN.TLD
       
   111 recipient_delimiter = +
       
   112 protocol lda {
       
   113   # uncomment if you want to use the quota plugin
       
   114   #mail_plugins = $mail_plugins
       
   115   # uncomment if you want to use the quota and sieve plugins
       
   116   #mail_plugins = $mail_plugins sieve
       
   117 }
       
   118 
       
   119 ###
       
   120 # conf.d/20-imap.conf
       
   121 ###
       
   122 protocol imap {
       
   123   # uncomment if you want to use the quota plugin
       
   124   #mail_plugins = $mail_plugins imap_quota
       
   125 }
       
   126 
       
   127 ###
       
   128 # conf.d/20-lmtp.conf
       
   129 ###
       
   130 protocol lmtp {
       
   131   # uncomment if you want to use the quota plugin
       
   132   #mail_plugins = $mail_plugins
       
   133   # uncomment if you want to use the quota and sieve plugins
       
   134   #mail_plugins = $mail_plugins sieve
       
   135 }
       
   136 
       
   137 ###
       
   138 # conf.d/90-quota.conf
       
   139 ###
       
   140 # uncomment if you want to use the quota plugin
       
   141 #plugin {
       
   142 #  quota = dict:user:%{uid}::proxy::quota
       
   143 #  quota_rule = *:storage=0:messages=0
       
   144 #  quota_rule2 = Trash:storage=+100M
       
   145 #}
       
   146 
       
   147 ###
       
   148 # conf.d/90-sieve.conf
       
   149 ###
       
   150 # uncomment if you want to use sieve (and maybe managesieve)
       
   151 #plugin {
       
   152 #  recipient_delimiter = +
       
   153 #  sieve = ~/.dovecot.sieve
       
   154 #  sieve_dir = ~/sieve
       
   155 #}
       
   156 
       
   157 ###############################################################################
       
   158 #			    end of local configuration			      #
       
   159 ###############################################################################
       
   160 
       
   161 
       
   162 ###
       
   163 # etc/dovecot/dovecot-sql.conf.ext
       
   164 ###
       
   165 # apply this settings to your dovecot-sql.conf.ext
       
   166 
       
   167 #driver = pgsql
       
   168 #connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
       
   169 #
       
   170 #password_query = \
       
   171 # SELECT userid AS "user", password FROM dovecotpassword('%Ln', '%Ld') WHERE %Ls
       
   172 #
       
   173 ## uncomment this user_query if you want to use the quota plugin
       
   174 #user_query = \
       
   175 # SELECT home, uid, gid, mail, quota_rule FROM dovecotquotauser('%Ln', '%Ld')
       
   176 ## otherwise uncomment the following user_query
       
   177 #user_query = SELECT home, uid, gid, mail FROM dovecotuser('%Ln', '%Ld')
       
   178 #
       
   179 #iterate_query = \
       
   180 # SELECT local_part AS username, domain_name.domainname AS domain \
       
   181 #   FROM users \
       
   182 #        LEFT JOIN domain_data USING (gid) \
       
   183 #        LEFT JOIN domain_name USING (gid)
       
   184 
       
   185 
       
   186 ###
       
   187 # etc/dovecot/dovecot-dict-sql.conf.ext
       
   188 ###
       
   189 # if you want to use the quota plugin add this lines to your
       
   190 #  dovecot-dict-sql.conf.ext
       
   191 
       
   192 #connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
       
   193 #map {
       
   194 #  pattern = priv/quota/storage
       
   195 #  table = userquota
       
   196 #  username_field = uid
       
   197 #  value_field = bytes
       
   198 #}
       
   199 #map {
       
   200 #  pattern = priv/quota/messages
       
   201 #  table = userquota
       
   202 #  username_field = uid
       
   203 #  value_field = messages
       
   204 #}