2017-07-10 15:19:12 +08:00
|
|
|
# --------------------------------------------------------------------------
|
|
|
|
# Please create a file "extra.conf" for persistent overrides to dovecot.conf
|
|
|
|
# --------------------------------------------------------------------------
|
2017-03-02 18:23:23 +08:00
|
|
|
auth_mechanisms = plain login
|
|
|
|
#mail_debug = yes
|
2018-02-28 03:54:46 +08:00
|
|
|
#auth_debug = yes
|
2017-05-07 05:42:07 +08:00
|
|
|
log_path = syslog
|
2017-03-02 18:23:23 +08:00
|
|
|
disable_plaintext_auth = yes
|
|
|
|
# Uncomment on NFS share
|
|
|
|
#mmap_disable = yes
|
|
|
|
#mail_fsync = always
|
|
|
|
#mail_nfs_index = yes
|
|
|
|
#mail_nfs_storage = yes
|
|
|
|
login_log_format_elements = "user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k"
|
|
|
|
mail_home = /var/vmail/%d/%n
|
|
|
|
mail_location = maildir:~/
|
2017-07-31 18:41:18 +08:00
|
|
|
mail_plugins = quota acl zlib listescape #mail_crypt
|
2018-01-14 17:44:06 +08:00
|
|
|
|
2018-01-09 18:28:12 +08:00
|
|
|
# Dovecot 2.2
|
2018-04-26 18:36:13 +08:00
|
|
|
#ssl_protocols = !SSLv3
|
2018-01-09 18:28:12 +08:00
|
|
|
# Dovecot 2.3
|
2018-04-26 18:36:13 +08:00
|
|
|
ssl_min_protocol = TLSv1
|
2018-01-14 17:44:06 +08:00
|
|
|
|
2017-03-02 18:23:23 +08:00
|
|
|
ssl_prefer_server_ciphers = yes
|
2018-06-26 13:50:17 +08:00
|
|
|
ssl_cipher_list = ALL:!ADH:!LOW:!SSLv2:!SSLv3:!EXP:!aNULL:!eNULL:!3DES:!MD5:!PSK:!DSS:!RC4:!SEED:!IDEA:+HIGH:+MEDIUM
|
2018-01-14 17:44:06 +08:00
|
|
|
|
2018-01-09 18:28:12 +08:00
|
|
|
# Default in Dovecot 2.3
|
2017-03-02 18:23:23 +08:00
|
|
|
ssl_options = no_compression
|
2018-01-14 17:44:06 +08:00
|
|
|
|
2018-01-09 18:28:12 +08:00
|
|
|
# New in Dovecot 2.3
|
2018-04-26 18:36:13 +08:00
|
|
|
ssl_dh=</etc/ssl/mail/dhparams.pem
|
2018-01-14 17:44:06 +08:00
|
|
|
# Dovecot 2.2
|
2018-04-26 18:36:13 +08:00
|
|
|
#ssl_dh_parameters_length = 2048
|
2017-03-02 18:23:23 +08:00
|
|
|
log_timestamp = "%Y-%m-%d %H:%M:%S "
|
|
|
|
recipient_delimiter = +
|
|
|
|
auth_master_user_separator = *
|
2017-09-14 19:32:11 +08:00
|
|
|
mail_shared_explicit_inbox = yes
|
2017-03-02 18:23:23 +08:00
|
|
|
mail_prefetch_count = 30
|
|
|
|
passdb {
|
|
|
|
driver = passwd-file
|
2017-04-06 04:22:23 +08:00
|
|
|
args = /usr/local/etc/dovecot/dovecot-master.passwd
|
2017-03-02 18:23:23 +08:00
|
|
|
master = yes
|
|
|
|
pass = yes
|
|
|
|
}
|
|
|
|
passdb {
|
2018-07-12 06:46:31 +08:00
|
|
|
args = /usr/local/etc/dovecot/sql/dovecot-dict-sql-passdb.conf
|
2017-03-02 18:23:23 +08:00
|
|
|
driver = sql
|
|
|
|
}
|
2017-07-11 03:30:45 +08:00
|
|
|
# Set doveadm_password=your-secret-password in data/conf/dovecot/extra.conf (create if missing)
|
|
|
|
service doveadm {
|
|
|
|
inet_listener {
|
|
|
|
port = 12345
|
|
|
|
}
|
|
|
|
}
|
2017-03-02 18:23:23 +08:00
|
|
|
namespace inbox {
|
|
|
|
inbox = yes
|
|
|
|
location =
|
|
|
|
separator = /
|
|
|
|
mailbox "Trash" {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Deleted Messages" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Deleted Items" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
2017-12-30 10:58:17 +08:00
|
|
|
mailbox "Rubbish" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
2017-03-02 18:23:23 +08:00
|
|
|
mailbox "Gelöschte Objekte" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Papierkorb" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Itens Excluidos" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Itens Excluídos" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Lixeira" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Prullenbak" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Verwijderde items" {
|
|
|
|
special_use = \Trash
|
|
|
|
}
|
|
|
|
mailbox "Archive" {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Archiv" {
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Archives" {
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Arquivo" {
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Arquivos" {
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Archief" {
|
|
|
|
special_use = \Archive
|
|
|
|
}
|
|
|
|
mailbox "Sent" {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Sent Messages" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Sent Items" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Gesendet" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Gesendete Objekte" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Itens Enviados" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Enviados" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Verzonden items" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Verzonden" {
|
|
|
|
special_use = \Sent
|
|
|
|
}
|
|
|
|
mailbox "Drafts" {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
mailbox "Entwürfe" {
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
mailbox "Rascunhos" {
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
mailbox "Concepten" {
|
|
|
|
special_use = \Drafts
|
|
|
|
}
|
|
|
|
mailbox "Junk" {
|
|
|
|
auto = subscribe
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
2017-06-25 17:32:21 +08:00
|
|
|
mailbox "Junk-E-Mail" {
|
2017-03-10 22:34:23 +08:00
|
|
|
special_use = \Junk
|
|
|
|
}
|
2017-06-25 17:32:21 +08:00
|
|
|
mailbox "Junk E-Mail" {
|
2017-03-02 18:23:23 +08:00
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
mailbox "Spam" {
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
mailbox "Lixo Eletrônico" {
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
mailbox "Ongewenste e-mail" {
|
|
|
|
special_use = \Junk
|
|
|
|
}
|
|
|
|
prefix =
|
|
|
|
}
|
|
|
|
namespace {
|
|
|
|
type = shared
|
|
|
|
separator = /
|
|
|
|
prefix = Shared/%%u/
|
2018-02-06 04:55:37 +08:00
|
|
|
location = maildir:%%h/:INDEX=~/Shared/%%u:INDEXPVT=~/Shared/%%u
|
2017-03-02 18:23:23 +08:00
|
|
|
subscriptions = no
|
2017-12-25 17:25:50 +08:00
|
|
|
list = children
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
protocols = imap sieve lmtp pop3
|
|
|
|
service dict {
|
|
|
|
unix_listener dict {
|
|
|
|
mode = 0660
|
|
|
|
user = vmail
|
|
|
|
group = vmail
|
|
|
|
}
|
|
|
|
}
|
2017-11-05 19:18:52 +08:00
|
|
|
service log {
|
|
|
|
user = dovenull
|
|
|
|
}
|
2017-03-02 18:23:23 +08:00
|
|
|
service auth {
|
|
|
|
inet_listener auth-inet {
|
|
|
|
port = 10001
|
|
|
|
}
|
|
|
|
unix_listener auth-master {
|
|
|
|
mode = 0600
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
unix_listener auth-userdb {
|
|
|
|
mode = 0600
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
}
|
|
|
|
service managesieve-login {
|
|
|
|
inet_listener sieve {
|
|
|
|
port = 4190
|
|
|
|
}
|
|
|
|
service_count = 1
|
|
|
|
process_min_avail = 2
|
2018-05-12 14:52:00 +08:00
|
|
|
vsz_limit = 256 M
|
2017-11-05 19:18:52 +08:00
|
|
|
}
|
|
|
|
service imap-login {
|
|
|
|
service_count = 1
|
2018-05-12 14:52:00 +08:00
|
|
|
vsz_limit = 256 M
|
2017-11-05 19:18:52 +08:00
|
|
|
user = dovenull
|
|
|
|
}
|
|
|
|
service pop3-login {
|
|
|
|
service_count = 1
|
2018-05-12 14:52:00 +08:00
|
|
|
vsz_limit = 256 M
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
service imap {
|
|
|
|
executable = imap imap-postlogin
|
2017-11-05 19:18:52 +08:00
|
|
|
user = dovenull
|
2018-05-12 14:52:00 +08:00
|
|
|
vsz_limit = 256 M
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
service managesieve {
|
|
|
|
process_limit = 256
|
|
|
|
}
|
|
|
|
service lmtp {
|
|
|
|
inet_listener lmtp-inet {
|
|
|
|
port = 24
|
|
|
|
}
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
listen = *,[::]
|
|
|
|
ssl_cert = </etc/ssl/mail/cert.pem
|
|
|
|
ssl_key = </etc/ssl/mail/key.pem
|
|
|
|
userdb {
|
2018-07-12 06:23:12 +08:00
|
|
|
args = /usr/local/etc/dovecot/sql/dovecot-dict-sql-userdb.conf
|
2017-03-02 18:23:23 +08:00
|
|
|
driver = sql
|
|
|
|
}
|
|
|
|
protocol imap {
|
2018-02-06 04:42:23 +08:00
|
|
|
imap_metadata = yes
|
2017-07-31 18:41:18 +08:00
|
|
|
mail_plugins = quota imap_quota imap_acl acl zlib imap_zlib imap_sieve listescape #mail_crypt
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
2018-02-06 04:42:23 +08:00
|
|
|
mail_attribute_dict = file:%h/dovecot-attributes
|
2017-03-02 18:23:23 +08:00
|
|
|
protocol lmtp {
|
2017-07-31 18:41:18 +08:00
|
|
|
mail_plugins = quota sieve acl zlib listescape #mail_crypt
|
2017-04-06 04:22:23 +08:00
|
|
|
auth_socket_path = /usr/local/var/run/dovecot/auth-master
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
protocol sieve {
|
|
|
|
managesieve_logout_format = bytes=%i/%o
|
|
|
|
}
|
|
|
|
plugin {
|
|
|
|
acl_anyone = allow
|
|
|
|
acl_shared_dict = file:/var/vmail/shared-mailboxes.db
|
|
|
|
acl = vfile
|
|
|
|
quota = dict:Userquota::proxy::sqlquota
|
|
|
|
quota_rule2 = Trash:storage=+100%%
|
|
|
|
sieve = /var/vmail/sieve/%u.sieve
|
2017-04-06 04:22:23 +08:00
|
|
|
sieve_plugins = sieve_imapsieve sieve_extprograms
|
|
|
|
# From elsewhere to Spam folder
|
|
|
|
imapsieve_mailbox1_name = Junk
|
|
|
|
imapsieve_mailbox1_causes = COPY
|
|
|
|
imapsieve_mailbox1_before = file:/usr/local/lib/dovecot/sieve/report-spam.sieve
|
|
|
|
# END
|
|
|
|
# From Spam folder to elsewhere
|
|
|
|
imapsieve_mailbox2_name = *
|
|
|
|
imapsieve_mailbox2_from = Junk
|
|
|
|
imapsieve_mailbox2_causes = COPY
|
|
|
|
imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve
|
|
|
|
# END
|
|
|
|
sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
|
|
|
|
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.execute
|
2017-03-02 18:23:23 +08:00
|
|
|
sieve_max_script_size = 1M
|
2018-01-09 18:28:12 +08:00
|
|
|
sieve_max_redirects = 30
|
2017-03-02 18:23:23 +08:00
|
|
|
sieve_quota_max_scripts = 0
|
|
|
|
sieve_quota_max_storage = 0
|
2017-07-31 18:41:18 +08:00
|
|
|
listescape_char = "\\"
|
2017-11-05 19:18:52 +08:00
|
|
|
sieve_before = dict:proxy::sieve_before;name=active;bindir=/var/vmail/sieve_before_bindir
|
|
|
|
sieve_after = dict:proxy::sieve_after;name=active;bindir=/var/vmail/sieve_after_bindir
|
2017-11-04 03:25:43 +08:00
|
|
|
sieve_after2 = /var/vmail/sieve/global.sieve
|
2017-04-10 19:09:33 +08:00
|
|
|
#mail_crypt_global_private_key = </mail_crypt/ecprivkey.pem
|
|
|
|
#mail_crypt_global_public_key = </mail_crypt/ecpubkey.pem
|
|
|
|
#mail_crypt_save_version = 2
|
2018-06-08 15:09:31 +08:00
|
|
|
# Enable compression while saving, lz4 Dovecot v2.2.11+
|
|
|
|
zlib_save = lz4
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
dict {
|
2017-11-04 03:25:43 +08:00
|
|
|
sqlquota = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-quota.conf
|
|
|
|
sieve_after = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_after.conf
|
|
|
|
sieve_before = mysql:/usr/local/etc/dovecot/sql/dovecot-dict-sql-sieve_before.conf
|
2017-03-02 18:23:23 +08:00
|
|
|
}
|
|
|
|
remote 127.0.0.1 {
|
|
|
|
disable_plaintext_auth = no
|
|
|
|
}
|
|
|
|
submission_host = postfix:588
|
|
|
|
mail_max_userip_connections = 500
|
|
|
|
service imap-postlogin {
|
|
|
|
executable = script-login /usr/local/bin/postlogin.sh
|
|
|
|
unix_listener imap-postlogin {
|
|
|
|
}
|
|
|
|
}
|
2018-06-20 13:25:10 +08:00
|
|
|
service stats {
|
|
|
|
unix_listener stats-writer {
|
|
|
|
mode = 0660
|
|
|
|
user = vmail
|
|
|
|
}
|
|
|
|
}
|
2017-07-10 15:19:12 +08:00
|
|
|
!include_try /usr/local/etc/dovecot/extra.conf
|