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