bundlewrap/bundles/dovecot/files/dovecot.conf

164 lines
3.6 KiB
Text
Raw Permalink Normal View History

2020-11-07 21:31:47 +00:00
!include conf.d/*.conf
namespace inbox {
type = private
inbox = yes
location =
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Junk {
auto = create
2020-11-07 21:31:47 +00:00
special_use = \Junk
autoexpunge = 30d
2020-11-07 21:31:47 +00:00
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
mailbox Trash {
auto = subscribe
special_use = \Trash
autoexpunge = 360d
2020-11-07 21:31:47 +00:00
}
prefix =
}
mail_location = maildir:/var/mail/vmail/%d/%n
protocols = imap lmtp sieve
ssl = yes
ssl_cert = </var/lib/dehydrated/certs/${node.metadata.get('postfix/myhostname', node.metadata['hostname'])}/fullchain.pem
ssl_key = </var/lib/dehydrated/certs/${node.metadata.get('postfix/myhostname', node.metadata['hostname'])}/privkey.pem
2020-11-07 21:31:47 +00:00
ssl_dh = </etc/dovecot/ssl/dhparam.pem
2021-01-24 17:44:25 +00:00
ssl_min_protocol = TLSv1.2
ssl_cipher_list = EECDH+AESGCM:EDH+AESGCM
ssl_prefer_server_ciphers = yes
2020-11-07 21:31:47 +00:00
login_greeting = IMAPd ready
auth_mechanisms = plain login
first_valid_uid = 65534
disable_plaintext_auth = yes
mail_plugins = $mail_plugins zlib old_stats
2020-11-07 21:31:47 +00:00
plugin {
zlib_save_level = 6
zlib_save = gz
sieve = /var/mail/vmail/sieve/%d/%n.sieve
2022-12-31 15:33:10 +00:00
sieve_dir = /var/mail/vmail/sieve/%d/%n/
2020-11-07 21:31:47 +00:00
sieve_extensions = +vnd.dovecot.pipe
2022-12-31 15:33:10 +00:00
sieve_pipe_bin_dir = /var/mail/vmail/sieve/bin
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_user_log = /var/mail/vmail/sieve/%d/%n.log
2020-11-07 21:31:47 +00:00
old_stats_refresh = 30 secs
old_stats_track_cmds = yes
2020-11-07 21:31:47 +00:00
% if node.has_bundle('rspamd'):
sieve_before = /var/mail/vmail/sieve/global/spam-global.sieve
# From elsewhere to Spam folder
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/var/mail/vmail/sieve/global/learn-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/var/mail/vmail/sieve/global/learn-ham.sieve
% endif
}
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
unix_listener auth-userdb {
mode = 0660
user = nobody
group = nogroup
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service imap {
executable = imap
}
service imap-login {
service_count = 1
process_min_avail = 8
vsz_limit = 64M
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
protocol lmtp {
mail_plugins = $mail_plugins sieve
postmaster_address = ${admin_email}
}
protocol imap {
mail_plugins = $mail_plugins imap_zlib imap_sieve imap_old_stats
2020-11-07 21:31:47 +00:00
mail_max_userip_connections = 50
imap_idle_notify_interval = 29 mins
}
protocol sieve {
plugin {
sieve = /var/mail/vmail/sieve/%d/%n.sieve
sieve_storage = /var/mail/vmail/sieve/%d/%n/
}
}
service old-stats {
% if node.has_bundle('telegraf'):
inet_listener {
address = 127.0.0.1
port = 24242
}
% endif
unix_listener old-stats {
mode = 0660
user = nobody
group = nogroup
}
fifo_listener old-stats-mail {
mode = 0660
user = nobody
group = nogroup
}
fifo_listener old-stats-user {
mode = 0660
user = nobody
group = nogroup
}
}