Alternc  latest
Alternc logiel libre pour l'hébergement
95_alternc.conf
Go to the documentation of this file.
1 # AUTO GENERATED FILE
2 # Modify template in /etc/alternc/templates/
3 # and launch alternc.install if you want
4 # to modify this file.
5 #
6 ## Dovecot configuration file
7 # This is a concatenation of all /etc/dovecot/conf.d/* from DEBIAN package
8 # with rules adapted to AlternC best practices and link with MySQL tables.
9 
10 protocols = imap pop3 sieve
11 
12 default_process_limit = 1000
13 
14 ## -------------------------------------------------------------------------
15 ## 10-auth
16 
17 # Disable LOGIN command and all other plaintext authentications unless
18 # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP
19 # matches the local IP (ie. you're connecting from the same computer), the
20 # connection is considered secure and plaintext authentication is allowed.
21 disable_plaintext_auth = no
22 
23 # Space separated list of wanted authentication mechanisms:
24 # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey
25 # gss-spnego
26 # NOTE: See also disable_plaintext_auth setting.
27 auth_mechanisms = plain login
28 
29 ##
30 ## Password and user databases
31 ##
32 
33 #
34 # Password database is used to verify user's password (and nothing more).
35 # You can have multiple passdbs and userdbs. This is useful if you want to
36 # allow both system users (/etc/passwd) and virtual users to login without
37 # duplicating the system users into virtual database.
38 #
39 # <doc/wiki/PasswordDatabase.txt>
40 #
41 # User database specifies where mails are located and what user/group IDs
42 # own them. For single-UID configuration use "static" userdb.
43 #
44 # <doc/wiki/UserDatabase.txt>
45 
46 #!include auth-deny.conf.ext
47 #!include auth-master.conf.ext
48 
49 #!include auth-system.conf.ext
50 #!include auth-sql.conf.ext
51 #!include auth-ldap.conf.ext
52 #!include auth-passwdfile.conf.ext
53 #!include auth-checkpassword.conf.ext
54 #!include auth-vpopmail.conf.ext
55 #!include auth-static.conf.ext
56 
57 
58 # ----------------------------------------------------------------------------
59 # 10-login.conf
60 
61 # Prefix for each line written to log file. % codes are in strftime(3)
62 # format.
63 #log_timestamp = "%b %d %H:%M:%S "
64 log_timestamp = "%Y-%m-%d %H:%M:%S "
65 
66 # ----------------------------------------------------------------------------
67 # 10-mail.conf
68 
69 
70 # Location for users' mailboxes. This is the same as the old default_mail_env
71 # setting. The default is empty, which means that Dovecot tries to find the
72 # mailboxes automatically. This won't work if the user doesn't have any mail
73 # yet, so you should explicitly tell Dovecot the full location.
74 #
75 # If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
76 # isn't enough. You'll also need to tell Dovecot where the other mailboxes are
77 # kept. This is called the "root mail directory", and it must be the first
78 # path given in the mail_location setting.
79 #
80 # There are a few special variables you can use, eg.:
81 #
82 # %u - username
83 # %n - user part in user@domain, same as %u if there's no domain
84 # %d - domain part in user@domain, empty if there's no domain
85 # %h - home directory
86 #
87 # See </usr/share/doc/dovecot-common/wiki/Variables.txt> for full list.
88 # Some examples:
89 #
90 # mail_location = maildir:~/Maildir
91 # mail_location = mbox:~/mail:INBOX=/var/mail/%u
92 # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
93 #
94 # </usr/share/doc/dovecot-common/wiki/MailLocation.txt>
95 #
96 mail_location = maildir:~/Maildir
97 
98 
99 # Group to enable temporarily for privileged operations. Currently this is
100 # used only with INBOX when either its initial creation or dotlocking fails.
101 # Typically this is set to "mail" to give access to /var/mail.
102 #mail_privileged_group =
103 mail_privileged_group = vmail
104 
105 
106 # Valid UID range for users, defaults to 500 and above. This is mostly
107 # to make sure that users can't log in as daemons or other system users.
108 # Note that denying root logins is hardcoded to dovecot binary and can't
109 # be done even if first_valid_uid is set to 0.
110 first_valid_uid = 2000
111 last_valid_uid = 65000
112 
113 # ----------------------------------------------------------------------------
114 # 10-master.conf
115 
116 passdb {
117  driver = sql
118  args = /etc/dovecot/alternc-sql.conf
119 }
120 
121 userdb {
122  driver = sql
123  args = /etc/dovecot/alternc-sql.conf
124 }
125 userdb {
126  driver = prefetch
127 }
128 
129 service auth {
130  unix_listener /var/spool/postfix/private/auth {
131  group = postfix
132  mode = 0660
133  user = postfix
134  }
135  unix_listener auth-master {
136  mode = 0600
137  user = vmail
138  }
139 
140  # set this to (default_client_limit * number of services using it)
141  client_limit = 5000
142 }
143 
144 service anvil {
145  # set this to (default_client_limit * number of services using it)
146  client_limit = 5000
147 }
148 
149 
150 # ----------------------------------------------------------------------------
151 # 10-ssl.conf
152 
153 # SSL/TLS support: yes, no, required. </usr/share/doc/dovecot-common/wiki/SSL.txt>
154 ssl = yes
155 
156 # PEM encoded X.509 SSL/TLS certificate and private key. They're opened before
157 # dropping root privileges, so keep the key file unreadable by anyone but
158 # root.
159 #ssl_cert = </etc/dovecot/dovecot.pem
160 #ssl_key = </etc/dovecot/dovecot.pem
161 
162 
163 # ----------------------------------------------------------------------------
164 # 15-lda.conf
165 
166 ##
167 ## LDA specific settings
168 ##
169 
170 protocol lda {
171  # Address to use when sending rejection mails (e.g. postmaster@example.com).
172  postmaster_address = postmaster@localhost
173 
174  # Hostname to use in various parts of sent mails, eg. in Message-Id.
175  # Default is the system's real hostname.
176  #hostname =
177 
178  # Support for dynamically loadable plugins. mail_plugins is a space separated
179  # list of plugins to load.
180  mail_plugins = quota sieve
181  #mail_plugin_dir = /usr/lib/dovecot/modules/lda
182 
183 
184  # UNIX socket path to master authentication server to find users.
185  auth_socket_path = /run/dovecot/auth-master
186 }
187 
188 
189 # ----------------------------------------------------------------------------
190 # 20-imap.conf
191 
192 protocol imap {
193  # Support for dynamically loadable plugins. mail_plugins is a space separated
194  # list of plugins to load.
195  mail_plugins = quota imap_quota
196  #mail_plugin_dir = /usr/lib/dovecot/modules/imap
197  mail_max_userip_connections = 500
198 }
199 
200 service imap {
201  executable = imap imap-postlogin
202  vsz_limit = 512M
203 }
204 
205 service imap-postlogin {
206  executable = script-login /usr/lib/alternc/popimap-log-login.sh
207  # the script process runs as the user specified here (v2.0.14+):
208 # user = $default_internal_user
209  # this UNIX socket listener must use the same name as given to imap executable
210  unix_listener imap-postlogin {
211  }
212 }
213 
214 # ----------------------------------------------------------------------------
215 # 20-managesieve.conf
216 
217 protocol sieve {
218  managesieve_notify_capability = mailto
219  managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
220 }
221 
222 service managesieve {
223  executable = /usr/lib/dovecot/managesieve
224 }
225 
226 
227 
228 # ----------------------------------------------------------------------------
229 # 20-pop3.conf
230 
231 protocol pop3 {
232 
233  # POP3 UIDL (unique mail identifier) format to use. You can use following
234  # variables, along with the variable modifiers described in
235  # </usr/share/doc/dovecot-common/wiki/Variables.txt> (e.g. %Uf for the
236  # filename in uppercase)
237  #
238  # %v - Mailbox's IMAP UIDVALIDITY
239  # %u - Mail's IMAP UID
240  # %m - MD5 sum of the mailbox headers in hex (mbox only)
241  # %f - filename (maildir only)
242  #
243  # If you want UIDL compatibility with other POP3 servers, use:
244  # UW's ipop3d : %08Xv%08Xu
245  # Courier : %f or %v-%u (both might be used simultaneosly)
246  # Cyrus (<= 2.1.3) : %u
247  # Cyrus (>= 2.1.4) : %v.%u
248  # Dovecot v0.99.x : %v.%u
249  # tpop3d : %Mf
250  #
251  # Note that Outlook 2003 seems to have problems with %v.%u format which was
252  # Dovecot's default, so if you're building a new server it would be a good
253  # idea to change this. %08Xu%08Xv should be pretty fail-safe.
254  #
255  pop3_uidl_format = %08Xu%08Xv
256 
257  # Support for dynamically loadable plugins. mail_plugins is a space separated
258  # list of plugins to load.
259  mail_plugins = quota
260  #mail_plugin_dir = /usr/lib/dovecot/modules/pop3
261 
262 }
263 
264 service pop3 {
265  executable = /usr/lib/alternc/popimap-log-login.sh /usr/lib/dovecot/pop3
266 }
267 
268 # ----------------------------------------------------------------------------
269 # 90-plugin.conf
270 
271 plugin {
272 
273  # Quota plugin. Multiple backends are supported:
274  # dirsize: Find and sum all the files found from mail directory.
275  # Extremely SLOW with Maildir. It'll eat your CPU and disk I/O.
276  # dict: Keep quota stored in dictionary (eg. SQL)
277  # maildir: Maildir++ quota
278  # fs: Read-only support for filesystem quota
279  #
280  # Quota limits are set using "quota_rule" parameters, either in here or in
281  # userdb. It's also possible to give mailbox-specific limits, for example:
282  # quota_rule = *:storage=1048576
283  quota_rule = *:storage=100M
284  quota_rule2 = Trash:storage=+10%%
285  # quota_rule2 = Trash:storage=102400
286  # User has now 1GB quota, but when saving to Trash mailbox the user gets
287  # additional 100MB.
288  #
289  # Multiple quota roots are also possible, for example:
290  # quota = dict:user::proxy::quota
291  # quota2 = dict:domain:%d:proxy::quota_domain
292  # quota_rule = *:storage=102400
293  # quota2_rule = *:storage=1048576
294  # Gives each user their own 100MB quota and one shared 1GB quota within
295  # the domain.
296  #
297  # You can execute a given command when user exceeds a specified quota limit.
298  # Each quota root has separate limits. Only the command for the first
299  # exceeded limit is excecuted, so put the highest limit first.
300  # Note that % needs to be escaped as %%, otherwise "% " expands to empty.
301  # quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95
302  # quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80
303  quota_warning = storage=95%% /usr/lib/alternc/quota-warning.sh 95
304  quota_warning2 = storage=80%% /usr/lib/alternc/quota-warning.sh 80
305  #quota = maildir
306  quota = dict:user::proxy::quotadict
307 
308 
309  # Sieve plugin (http://wiki.dovecot.org/LDA/Sieve) and ManageSieve service
310  #
311  # Location of the active script. When ManageSieve is used this is actually
312  # a symlink pointing to the active script in the sieve storage directory.
313  sieve=~/.dovecot.sieve
314  #
315  # The path to the directory where the personal Sieve scripts are stored. For
316  # ManageSieve this is where the uploaded scripts are stored.
317  sieve_dir=~/sieve
318 }
319 
320 # Dictionary can be used by some plugins to store key=value lists, such as
321 # quota, expire and acl plugins. The dictionary can be used either directly or
322 # though a dictionary server. The following dict block maps dictionary names to
323 # URIs when the server is used. These can then be referenced using URIs in
324 # format "proxy::<name>".
325 
326 dict {
327  quotadict = mysql:/etc/dovecot/alternc-dict-quota.conf
328  #expire = db:/var/lib/dovecot/expire.db
329 }
330 
331 
332 service auth-worker {
333  user = vmail
334 }
335 
336 service dict {
337  unix_listener dict {
338  mode = 0660
339  user = vmail
340  group = vmail
341  }
342 }