Providing Dovecot 2.x configuration steps on FreeBSD

(fixes also the FreeBSD-Part of ticket #1015)
- configuration files can be adopted for other os i think
This commit is contained in:
byteworkshosting
2013-03-12 11:57:50 +01:00
parent b5fb0da98f
commit 877add851b
3 changed files with 178 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
driver = mysql
connect = host=<SQL_HOST> dbname=<SQL_DB> user=<SQL_UNPRIVILEGED_USER> password=<SQL_UNPRIVILEGED_PASSWORD>
default_pass_scheme = CRYPT
password_query = SELECT username AS user, password_enc AS password, CONCAT(homedir, maildir) AS userdb_home, uid AS userdb_uid, gid AS userdb_gid, CONCAT('maildir:', homedir, maildir) AS userdb_mail, CONCAT('maildir:storage=', (quota*1024)) as userdb_quota FROM mail_users WHERE (username = '%u' OR email = '%u') AND ((imap = 1 AND '%Ls' = 'imap') OR (pop3 = 1 AND '%Ls' = 'pop3') OR '%Ls' = 'smtp' OR '%Ls' = 'sieve')
user_query = SELECT CONCAT(homedir, maildir) AS home, CONCAT('maildir:', homedir, maildir) AS mail, uid, gid, CONCAT('*:storage=', (quota*1024)) as quota_rule FROM mail_users WHERE (username = '%u' OR email = '%u')
# this query is used for doveadm:
iterate_query = SELECT username AS user FROM mail_users

View File

@@ -0,0 +1,138 @@
### Dovecot 2.x configuration file ###
mail_plugins =
protocols = imap lmtp sieve
listen = *, [::]
mail_uid = vmail
mail_gid = vmail
mail_access_groups = vmail
disable_plaintext_auth = yes
auth_mechanisms = plain login
auth_cache_negative_ttl = 1 mins
auth_cache_size = 1 k
ssl = yes
#ssl_cert = </example.crt
#ssl_key = </example.key
#ssl_ca = </example_ca.pem
ssl_require_crl = yes
ssl_protocols = TLSv1
ssl_cipher_list = HIGH
passdb {
args = /usr/local/etc/dovecot/dovecot-sql.conf
driver = sql
}
userdb {
args = /usr/local/etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
# put your plugins here
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
}
service auth-worker {
user = dovecot
}
lmtp_save_to_detail_mailbox = yes
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0660
user = postfix
}
}
service imap-login {
chroot = login
client_limit = 256
executable = /usr/local/libexec/dovecot/imap-login
process_min_avail = 2
process_limit = 128
service_count = 1
inet_listener imap {
address = *, [::]
port = 143
}
inet_listener imaps {
address = *, [::]
port = 993
}
}
service imap {
executable = /usr/local/libexec/dovecot/imap
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
inet_listener sieve_deprecated {
port = 2000
}
}
protocol sieve {
# not implemented yet
}
protocol imap {
mail_plugins = $mail_plugins
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
imap_max_line_length = 64 k
}
protocol lmtp {
mail_plugins = $mail_plugins
postmaster_address = postmaster@example.net
}