import from ansible role
This commit is contained in:
10
confd/conf.d/auth.toml
Normal file
10
confd/conf.d/auth.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[template]
|
||||
src = "10-auth.conf.tmpl"
|
||||
dest = "/etc/dovecot/local.d/10-auth.conf"
|
||||
keys = [
|
||||
"/mail/domains",
|
||||
"/auth/username/format",
|
||||
"/auth/mechanisms",
|
||||
"/auth/master/enable",
|
||||
"/ldap/enable"
|
||||
]
|
||||
7
confd/conf.d/imap.toml
Normal file
7
confd/conf.d/imap.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
[template]
|
||||
src = "20-imap.conf.tmpl"
|
||||
dest = "/etc/dovecot/local.d/20-imap.conf"
|
||||
keys = [
|
||||
"/antispam/enable",
|
||||
"/imap/urlauth/host"
|
||||
]
|
||||
18
confd/conf.d/ldap.toml
Normal file
18
confd/conf.d/ldap.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[template]
|
||||
src = "ldap.conf.ext.tmpl"
|
||||
dest = "/etc/dovecot/local.d/ldap.conf.ext"
|
||||
keys = [
|
||||
"/ldap/hosts",
|
||||
"/ldap/uris",
|
||||
"/ldap/bind",
|
||||
"/ldap/version",
|
||||
"/ldap/base",
|
||||
"/ldap/scope",
|
||||
"/ldap/user/attrs",
|
||||
"/ldap/user/filter",
|
||||
"/ldap/pass/attrs",
|
||||
"/ldap/pass/filter",
|
||||
"/ldap/iterate/attrs",
|
||||
"/ldap/iterate/filter",
|
||||
"/ldap/default/pass/scheme",
|
||||
]
|
||||
18
confd/conf.d/ldap2.toml
Normal file
18
confd/conf.d/ldap2.toml
Normal file
@@ -0,0 +1,18 @@
|
||||
[template]
|
||||
src = "ldap.conf.ext.tmpl"
|
||||
dest = "/etc/dovecot/local.d/ldap2.conf.ext"
|
||||
keys = [
|
||||
"/ldap/hosts",
|
||||
"/ldap/uris",
|
||||
"/ldap/bind",
|
||||
"/ldap/version",
|
||||
"/ldap/base",
|
||||
"/ldap/scope",
|
||||
"/ldap/user/attrs",
|
||||
"/ldap/user/filter",
|
||||
"/ldap/pass/attrs",
|
||||
"/ldap/pass/filter",
|
||||
"/ldap/iterate/attrs",
|
||||
"/ldap/iterate/filter",
|
||||
"/ldap/default/pass/scheme",
|
||||
]
|
||||
6
confd/conf.d/lmtp.toml
Normal file
6
confd/conf.d/lmtp.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[template]
|
||||
src = "20-lmtp.conf.tmpl"
|
||||
dest = "/etc/dovecot/local.d/20-lmtp.conf"
|
||||
keys = [
|
||||
"/mail/domains"
|
||||
]
|
||||
15
confd/conf.d/submission.toml
Normal file
15
confd/conf.d/submission.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[template]
|
||||
src = "submission.conf.tmpl"
|
||||
dest = "/etc/dovecot/local.d/submission.conf"
|
||||
keys = [
|
||||
"/submission/hostname",
|
||||
"/submission/relay/host",
|
||||
"/submission/relay/port",
|
||||
"/submission/relay/trusted",
|
||||
"/submission/relay/user",
|
||||
"/submission/relay/master/user",
|
||||
"/submission/relay/password",
|
||||
"/submission/relay/ssl",
|
||||
"/submission/relay/ssl/verify",
|
||||
"/submission/relay/rawlog/dir"
|
||||
]
|
||||
32
confd/templates/10-auth.conf.tmpl
Normal file
32
confd/templates/10-auth.conf.tmpl
Normal file
@@ -0,0 +1,32 @@
|
||||
auth_realms = {{ getv "/mail/domains" }}
|
||||
auth_default_realm = {{ index (split (getv "/mail/domains") " ") 0 }}
|
||||
auth_username_format = {{ getv "/auth/username/format" }}
|
||||
auth_mechanisms = {{ getv "/auth/mechanisms" }}
|
||||
|
||||
|
||||
{{ if eq (getv "/auth/master/enable") "yes"}}
|
||||
passdb {
|
||||
driver = passwd-file
|
||||
master = yes
|
||||
args = /etc/dovecot/master-users
|
||||
|
||||
# Unless you're using PAM, you probably still want the destination user to
|
||||
# be looked up from passdb that it really exists. pass=yes does that.
|
||||
pass = yes
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if eq (getv "/ldap/enable") "yes"}}
|
||||
passdb {
|
||||
driver = ldap
|
||||
args = /etc/dovecot/local.d/ldap.conf.ext
|
||||
}
|
||||
userdb {
|
||||
driver = prefetch
|
||||
}
|
||||
userdb {
|
||||
driver = ldap
|
||||
args = /etc/dovecot/local.d/ldap2.conf.ext
|
||||
}
|
||||
{{ end }}
|
||||
6
confd/templates/20-imap.conf.tmpl
Normal file
6
confd/templates/20-imap.conf.tmpl
Normal file
@@ -0,0 +1,6 @@
|
||||
imap_capability = +SPECIAL_USE
|
||||
imap_urlauth_host = {{ getv "/imap/urlauth/host" }}
|
||||
protocol imap {
|
||||
mail_plugins = $mail_plugins {{ if eq (getv "/antispam/enable") "yes" }}antispam{{ end }}
|
||||
imap_metadata = yes
|
||||
}
|
||||
5
confd/templates/20-lmtp.conf.tmpl
Normal file
5
confd/templates/20-lmtp.conf.tmpl
Normal file
@@ -0,0 +1,5 @@
|
||||
protocol lmtp {
|
||||
# postmaster_address aparentemente es obligatorio
|
||||
postmaster_address = postmaster@{{ index (split (getv "/mail/domains") " ") 0 }}
|
||||
mail_plugins = $mail_plugins sieve
|
||||
}
|
||||
27
confd/templates/90-quota.conf.tmpl
Normal file
27
confd/templates/90-quota.conf.tmpl
Normal file
@@ -0,0 +1,27 @@
|
||||
plugin {
|
||||
#quota_rule = *:storage=1G
|
||||
#quota_rule2 = Trash:storage=+100M
|
||||
quota_rule = *:storage={{ dovecot_quota_limit }}
|
||||
{% for key, value in dovecot_quota_additional_limit.items() %}
|
||||
quota_rule{{ loop.index + 1 }} = {{ key }}:storage=+{{ value }}
|
||||
{% endfor %}
|
||||
|
||||
# LDA/LMTP allows saving the last mail to bring user from under quota to
|
||||
# over quota, if the quota doesn't grow too high. Default is to allow as
|
||||
# long as quota will stay under 10% above the limit. Also allowed e.g. 10M.
|
||||
#quota_grace = 10%%
|
||||
quota_grace = {{ dovecot_quota_grace | regex_replace("%.*$","%%") }}
|
||||
|
||||
{% if dovecot_quota_driver == "count" %}
|
||||
quota_vsizes = yes
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
|
||||
plugin {
|
||||
quota = {{ dovecot_quota_driver }}:User quota
|
||||
#quota = dirsize:User quota
|
||||
#quota = maildir:User quota
|
||||
#quota = dict:User quota::proxy::quota
|
||||
#quota = fs:User quota
|
||||
}
|
||||
16
confd/templates/ldap.conf.ext.tmpl
Normal file
16
confd/templates/ldap.conf.ext.tmpl
Normal file
@@ -0,0 +1,16 @@
|
||||
{{ if (getv "/ldap/hosts") }}
|
||||
hosts = {{ getv "/ldap/hosts" }}
|
||||
{{ else }}
|
||||
uris = {{ getv "/ldap/uris" }}
|
||||
{{ end }}
|
||||
auth_bind = {{ getv "/ldap/bind" }}
|
||||
ldap_version = {{ getv "/ldap/version" }}
|
||||
base = {{ getv "/ldap/base" }}
|
||||
scope = {{ getv "/ldap/scope" }}
|
||||
user_attrs = {{ getv "/ldap/user/attrs" }}
|
||||
user_filter = {{ getv "/ldap/user/filter" }}
|
||||
pass_attrs = {{ getv "/ldap/pass/attrs" }}
|
||||
pass_filter = {{ getv "/ldap/pass/filter" }}
|
||||
iterate_attrs = {{ getv "/ldap/iterate/attrs" }}
|
||||
iterate_filter = {{ getv "/ldap/iterate/filter" }}
|
||||
default_pass_scheme = {{ getv "/ldap/default/pass/scheme" }}
|
||||
10
confd/templates/submission.conf.tmpl
Normal file
10
confd/templates/submission.conf.tmpl
Normal file
@@ -0,0 +1,10 @@
|
||||
hostname = {{getv "/submission/hostname"}}
|
||||
submission_relay_host = {{getv "/submission/relay/host"}}
|
||||
submission_relay_port = {{getv "/submission/relay/port"}}
|
||||
submission_relay_trusted = {{getv "/submission/relay/trusted"}}
|
||||
submission_relay_user = {{getv "/submission/relay/user"}}
|
||||
submission_relay_master_user = {{getv "/submission/relay/master/user"}}
|
||||
submission_relay_password = {{getv "/submission/relay/password"}}
|
||||
submission_relay_ssl = {{getv "/submission/relay/ssl"}}
|
||||
submission_relay_ssl_verify = {{getv "/submission/relay/ssl/verify"}}
|
||||
submission_relay_rawlog_dir = {{getv "/submission/relay/rawlog/dir"}}
|
||||
Reference in New Issue
Block a user