2 # Modify template in /etc/alternc/templates/
3 # and launch alternc.install if you want
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.
10 protocols = imap pop3 sieve
12 default_process_limit = 1000
14 ## -------------------------------------------------------------------------
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
23 # Space separated list of wanted authentication mechanisms:
24 # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey
26 # NOTE: See also disable_plaintext_auth setting.
27 auth_mechanisms = plain login
30 ## Password and user databases
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.
39 # <doc/wiki/PasswordDatabase.txt>
41 # User database specifies where mails are located and what user/group IDs
42 # own them. For single-UID configuration use "static" userdb.
44 # <doc/wiki/UserDatabase.txt>
46 #!include auth-deny.conf.ext
47 #!include auth-master.conf.ext
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
58 # ----------------------------------------------------------------------------
61 # Prefix for each line written to log file. % codes are in strftime(3)
63 #log_timestamp = "%b %d %H:%M:%S "
64 log_timestamp = "%Y-%m-%d %H:%M:%S "
66 # ----------------------------------------------------------------------------
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.
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.
80 # There are a few special variables you can use, eg.:
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
87 # See </usr/share/doc/dovecot-common/wiki/Variables.txt> for full list.
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
94 # </usr/share/doc/dovecot-common/wiki/MailLocation.txt>
96 mail_location = maildir:~/Maildir
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
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
113 # ----------------------------------------------------------------------------
118 args = /etc/dovecot/alternc-sql.conf
123 args = /etc/dovecot/alternc-sql.conf
130 unix_listener /var/spool/postfix/private/auth {
135 unix_listener auth-master {
140 # set this to (default_client_limit * number of services using it)
145 # set this to (default_client_limit * number of services using it)
150 # ----------------------------------------------------------------------------
153 # SSL/TLS support: yes, no, required. </usr/share/doc/dovecot-common/wiki/SSL.txt>
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
159 #ssl_cert = </etc/dovecot/dovecot.pem
160 #ssl_key = </etc/dovecot/dovecot.pem
163 # ----------------------------------------------------------------------------
167 ## LDA specific settings
171 # Address to use when sending rejection mails (e.g. postmaster@example.com).
172 postmaster_address = postmaster@localhost
174 # Hostname to use in various parts of sent mails, eg. in Message-Id.
175 # Default is the system's real hostname.
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
184 # UNIX socket path to master authentication server to find users.
185 auth_socket_path = /run/dovecot/auth-master
189 # ----------------------------------------------------------------------------
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
201 executable = imap imap-postlogin
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 {
214 # ----------------------------------------------------------------------------
215 # 20-managesieve.conf
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
222 service managesieve {
223 executable = /usr/lib/dovecot/managesieve
228 # ----------------------------------------------------------------------------
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)
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)
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
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.
255 pop3_uidl_format = %08Xu%08Xv
257 # Support for dynamically loadable plugins. mail_plugins is a space separated
258 # list of plugins to load.
260 #mail_plugin_dir = /usr/lib/dovecot/modules/pop3
265 executable = /usr/lib/alternc/popimap-log-login.sh /usr/lib/dovecot/pop3
268 # ----------------------------------------------------------------------------
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
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
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
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
306 quota = dict:user::proxy::quotadict
309 # Sieve plugin (http://wiki.dovecot.org/LDA/Sieve) and ManageSieve service
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
315 # The path to the directory where the personal Sieve scripts are stored. For
316 # ManageSieve this is where the uploaded scripts are stored.
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>".
327 quotadict = mysql:/etc/dovecot/alternc-dict-quota.conf
328 #expire = db:/var/lib/dovecot/expire.db
332 service auth-worker {