diff --git a/templates/10-auth.conf.j2 b/templates/10-auth.conf.j2 index b0f8874..e67be05 100644 --- a/templates/10-auth.conf.j2 +++ b/templates/10-auth.conf.j2 @@ -126,7 +126,7 @@ auth_mechanisms = {{ dovecot_auth_mechanisms }} !include auth-system.conf.ext {% endif %} #!include auth-sql.conf.ext -{% if dovecot_auth_ldap_enable %} +{% if dovecot_ldap_enable %} !include auth-ldap.conf.ext {% endif %} #!include auth-passwdfile.conf.ext diff --git a/templates/20-imap.conf.j2 b/templates/20-imap.conf.j2 index d3cd35f..b8b025f 100644 --- a/templates/20-imap.conf.j2 +++ b/templates/20-imap.conf.j2 @@ -67,9 +67,7 @@ protocol imap { # Space separated list of plugins to load (default is global mail_plugins). - mail_plugins = $mail_plugins {% if dovecot_plugin_antispam_enable -%} - antispam - {% endif %} + mail_plugins = $mail_plugins {{ 'antispam' if dovecot_antispam_enable else '' }} # Maximum number of IMAP connections allowed for a user from each IP address. # NOTE: The username is compared case-sensitively. diff --git a/templates/20-lmtp.conf.j2 b/templates/20-lmtp.conf.j2 index 462e228..0aeaaa5 100644 --- a/templates/20-lmtp.conf.j2 +++ b/templates/20-lmtp.conf.j2 @@ -24,8 +24,5 @@ protocol lmtp { # postmaster_address aparentemente es obligatorio postmaster_address = postmaster@{{ mail_domains | first }} # Space separated list of plugins to load (default is global mail_plugins). - mail_plugins = $mail_plugins {% if dovecot_plugin_sieve_enable -%} - sieve - {% endif %} + mail_plugins = $mail_plugins {{ 'sieve' if dovecot_sieve_enable else '' }} } - diff --git a/templates/90-antispam.conf.j2 b/templates/90-antispam.conf.j2 index ff9dcc1..a5a3028 100644 --- a/templates/90-antispam.conf.j2 +++ b/templates/90-antispam.conf.j2 @@ -11,10 +11,10 @@ plugin { # antispam_debug_target = syslog # antispam_debug_target = stderr # antispam_verbose_debug = 1 -{% if dovecot_plugin_antispam.debug_enable -%} -antispam_debug_target = {{dovecot_plugin_antispam.debug_target}} -antispam_verbose_debug = {{dovecot_plugin_antispam.debug_verbosity}} -{% endif -%} +{%- if dovecot_antispam_debug_enable %} +antispam_debug_target = {{ dovecot_antispam_debug_target }} +antispam_verbose_debug = {{ dovecot_antispam_debug_verbosity }} +{%- endif %} # backend selection, MUST be configured first, # there's no default so you need to set one of @@ -23,17 +23,17 @@ antispam_verbose_debug = {{dovecot_plugin_antispam.debug_verbosity}} # antispam_backend = dspam # antispam_backend = pipe # antispam_backend = spool2dir -antispam_backend = {{ dovecot_plugin_antispam.backend }} +antispam_backend = {{ dovecot_antispam_backend }} # mail signature (used with any backend requiring a signature) -antispam_signature = {{ dovecot_plugin_antispam.signature }} +antispam_signature = {{ dovecot_antispam_signature }} # action to take on mails without signature # (used with any backend requiring a signature) # (we recommend only setting this to 'move' after verifying that the # whole setup is working) # antispam_signature_missing = move # move silently without training -antispam_signature_missing = {{ dovecot_plugin_antispam.signature_missing }} +antispam_signature_missing = {{ dovecot_antispam_signature_missing }} # The list of folders for trash, spam and unsure can be given # with three options, e.g. "trash" matches the given folders @@ -62,13 +62,13 @@ antispam_signature_missing = {{ dovecot_plugin_antispam.signature_missing }} # antispam_trash = trash;Trash;Deleted Items; Deleted Messages # antispam_trash_pattern = trash;Trash;Deleted * # antispam_trash_pattern_ignorecase =trash;deleted * -antispam_trash = {{ dovecot_plugin_antispam.trash }} +antispam_trash = {{ dovecot_antispam_trash }} # semicolon-separated list of spam folders # antispam_spam = SPAM # antispam_spam_pattern = SPAM # antispam_spam_pattern_ignorecase = junk*;spam* -antispam_spam = {{ dovecot_plugin_antispam.spam }} +antispam_spam = {{ dovecot_antispam_spam }} # semicolon-separated list of unsure folders (default unset i.e. none) # antispam_unsure = @@ -140,16 +140,16 @@ antispam_spam = {{ dovecot_plugin_antispam.spam }} # /path/to/mailtrain --for jberg --spam --my-other-param1 # temporary directory -antispam_pipe_tmpdir = {{ dovecot_plugin_antispam.pipe_tmpdir }} +antispam_pipe_tmpdir = {{ dovecot_antispam_pipe_tmpdir }} # spam/not-spam argument (default unset which will is not what you want) -antispam_pipe_program_spam_arg = {{ dovecot_plugin_antispam.pipe_program_spam_arg }} -antispam_pipe_program_notspam_arg = {{ dovecot_plugin_antispam.pipe_program_notspam_arg }} +antispam_pipe_program_spam_arg = {{ dovecot_antispam_pipe_program_spam_arg }} +antispam_pipe_program_notspam_arg = {{ dovecot_antispam_pipe_program_notspam_arg }} # binary to pipe mail to -antispam_pipe_program = {{ dovecot_plugin_antispam.pipe_program }} +antispam_pipe_program = {{ dovecot_antispam_pipe_program }} #antispam_pipe_program_args = -f;%u@example.com # % expansion done by dovecot -antispam_pipe_program_args = {{ dovecot_plugin_antispam.pipe_program_args }} +antispam_pipe_program_args = {{ dovecot_antispam_pipe_program_args }} #=================== # crm114 plugin diff --git a/templates/90-quota.conf.j2 b/templates/90-quota.conf.j2 index d83119f..dc72756 100644 --- a/templates/90-quota.conf.j2 +++ b/templates/90-quota.conf.j2 @@ -15,17 +15,17 @@ # to give additional 100 MB when saving to Trash: plugin { - quota_rule = *:storage={{dovecot_plugin_quota.limit}} - {% for key, value in dovecot_plugin_quota.mailbox_additional_limit.iteritems() -%} - quota_rule{{ loop.index + 1 }} = {{ key }}:storage=+{{value}} + quota_rule = *:storage={{ dovecot_quota_limit }} + {%- for key, value in dovecot_quota_additional_limit.iteritems() %} + 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 = {{ dovecot_plugin_quota.grace | regex_replace("%.*$","%%") }} + quota_grace = {{ dovecot_quota_grace | regex_replace("%.*$","%%") }} - {% if dovecot_plugin_quota.driver == "count" -%} + {%- if dovecot_quota_driver == "count" %} quota_vsizes = yes {% endif %} } @@ -70,7 +70,7 @@ plugin { # fs: Read-only support for filesystem quota plugin { - quota = {{ dovecot_plugin_quota.driver }}:User quota + quota = {{ dovecot_quota_driver }}:User quota #quota = dirsize:User quota #quota = maildir:User quota #quota = dict:User quota::proxy::quota diff --git a/templates/90-sieve.conf.j2 b/templates/90-sieve.conf.j2 index e220820..f2cce95 100644 --- a/templates/90-sieve.conf.j2 +++ b/templates/90-sieve.conf.j2 @@ -73,14 +73,14 @@ plugin { # to the script execution sequence in the specified order. Reading the # numbered sieve_before settings stops at the first missing setting, so no # numbers may be skipped. - sieve_before = {{ dovecot_plugin_sieve.before }} + sieve_before = {{ dovecot_sieve_before }} #sieve_before2 = ldap:/etc/sieve-ldap.conf;name=ldap-domain #sieve_before3 = (etc...) # Identical to sieve_before, only the specified scripts are executed after the # user's script (only when keep is still in effect!). Multiple script # locations can be specified by appending an increasing number. - sieve_after = {{ dovecot_plugin_sieve.after }} + sieve_after = {{ dovecot_sieve_after }} #sieve_after2 = #sieve_after2 = (etc...)