wmdeit-cf-wmdelib/templates/dovecot/dovecot.conf.mustache

157 lines
3.4 KiB
Plaintext
Raw Normal View History

2023-10-11 16:15:15 +00:00
#
# Manged by CFEngine
#
protocols = {{#vars.dovecot.cfg.protocols}} {{.}} {{/vars.dovecot.cfg.protocols}}
2023-10-31 16:25:01 +00:00
#service imap-login {
# inet_listener imap {
# #port = 143
# }
#
#{{#vars.dovecot.cfg.ssl}}
# inet_listener imaps {
# port = 993
# ssl = yes
# }
#{{/vars.dovecot.cfg.ssl}}
2023-10-11 16:15:15 +00:00
# Number of connections to handle before starting a new process. Typically
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
# is faster. <doc/wiki/LoginProcess.txt>
#service_count = 1
# Number of processes to always keep waiting for more connections.
#process_min_avail = 0
# If you set service_count=0, you probably need to grow this.
#vsz_limit = $default_vsz_limit
2023-10-31 16:25:01 +00:00
#}
2023-10-11 16:15:15 +00:00
protocol imap {
2023-10-31 16:25:01 +00:00
{{#vars.dovecot.cfg.ssl}}
2023-10-11 16:15:15 +00:00
ssl_cert = <{{vars.dovecot.imap_cert}}
ssl_key = <{{vars.dovecot.imap_key}}
2023-10-31 16:25:01 +00:00
{{/vars.dovecot.cfg.ssl}}
2023-10-11 16:15:15 +00:00
2023-10-14 13:16:27 +00:00
# Space separated list of plugins to load (default is global mail_plugins).
#mail_plugins = $mail_plugins
2023-10-11 16:15:15 +00:00
2023-10-14 13:16:27 +00:00
# Maximum number of IMAP connections allowed for a user from each IP address.
# NOTE: The username is compared case-sensitively.
#mail_max_userip_connections = 10
}
protocol submission {
2023-10-31 16:25:01 +00:00
{{#vars.dovecot.cfg.ssl}}
2023-10-14 13:16:27 +00:00
ssl_cert = <{{vars.dovecot.submission_cert}}
ssl_key = <{{vars.dovecot.submission_key}}
2023-10-31 16:25:01 +00:00
{{/vars.dovecot.cfg.ssl}}
2023-10-14 13:16:27 +00:00
# Space separated list of plugins to load (default is global mail_plugins).
#mail_plugins = $mail_plugins
# Maximum number of IMAP connections allowed for a user from each IP address.
# NOTE: The username is compared case-sensitively.
#mail_max_userip_connections = 10
2023-10-11 16:15:15 +00:00
}
2023-10-31 16:25:01 +00:00
protocol lda {
mail_plugins = $mail_plugins sieve
}
protocol lmtp {
mail_plugins = $mail_plugins sieve
}
2023-10-11 16:15:15 +00:00
{{#vars.dovecot.cfg.userdbs}}
userdb {
driver = {{driver}}
args = {{args}}
{{raw}}
}
{{/vars.dovecot.cfg.userdbs}}
{{#vars.dovecot.cfg.passdbs}}
passdb {
driver = {{driver}}
args = {{args}}
{{raw}}
}
{{/vars.dovecot.cfg.passdbs}}
2023-10-14 13:16:27 +00:00
{{#vars.dovecot.cfg.services}}
#
# {{comment}}
#
service {{@}} {
{{{raw}}}
}
{{/vars.dovecot.cfg.services}}
{{#vars.dovecot.cfg.default_imap_folders}}
namespace inbox {
inbox = yes
# These mailboxes are widely used and could perhaps be created automatically:
mailbox Drafts {
special_use = \Drafts
auto = subscribe
}
mailbox Junk {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
}
{{/vars.dovecot.cfg.default_imap_folders}}
2023-11-06 08:25:21 +00:00
protocol imap {
mail_plugins = $mail_plugins imap_sieve
}
2023-11-06 08:25:21 +00:00
{{#vars.dovecot.cfg.rspamd_scripts}}
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
# From elsewhere to Spam folder
imapsieve_mailbox1_name = Junk
imapsieve_mailbox1_causes = COPY
2023-11-06 08:25:21 +00:00
imapsieve_mailbox1_before = file:{{vars.dovecot.cfg_dir}}/rspamd/rspamd-learn-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Junk
imapsieve_mailbox2_causes = COPY
2023-11-06 08:25:21 +00:00
imapsieve_mailbox2_before = file:{{vars.dovecot.cfg_dir}}/rspamd/rspamd-learn-ham.sieve
2023-11-06 08:25:21 +00:00
sieve_pipe_bin_dir = {{vars.dovecot.cfg_dir}}/rspamd
sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
}
{{/vars.dovecot.cfg.rspamd_scripts}}
2023-11-06 08:25:21 +00:00
{{#vars.dovecot.cfg.global_sieve_after}}
plugin {
sieve_after = {{vars.dovecot.cfg_dir}}/rspamd/global_sieve_after.sieve
}
{{/vars.dovecot.cfg.global_sieve_after}}
2023-10-14 13:16:27 +00:00
2023-10-11 16:15:15 +00:00
{{vars.dovecot.cfg.raw}}