From 78bd7aed870383a6a447860eed996b902445928b Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Thu, 13 Jul 2023 19:47:03 +0200 Subject: [PATCH] updated dovecot state --- states/dovecot/config.sls | 4 ++-- states/dovecot/defaults.yaml | 8 ++++---- states/dovecot/install.sls | 1 + states/dovecot/{files => templates}/config.j2 | 0 4 files changed, 7 insertions(+), 6 deletions(-) rename states/dovecot/{files => templates}/config.j2 (100%) diff --git a/states/dovecot/config.sls b/states/dovecot/config.sls index a630b6b..9c50e57 100644 --- a/states/dovecot/config.sls +++ b/states/dovecot/config.sls @@ -10,7 +10,7 @@ dovecot-imap-user: dovecot-config-main-{{ name }}: file.managed: - name: {{ dovecot.config_dir }}/{{ name }} - - source: salt://dovecot/files/config.j2 + - source: salt://dovecot/templates/config.j2 - template: jinja - user: root - group: root @@ -24,7 +24,7 @@ dovecot-config-main-{{ name }}: dovecot-config-conf.d-{{ name }}: file.managed: - name: {{ dovecot.config_dir }}/conf.d/{{ name }} - - source: salt://dovecot/files/config.j2 + - source: salt://dovecot/templates/config.j2 - template: jinja - user: root - group: root diff --git a/states/dovecot/defaults.yaml b/states/dovecot/defaults.yaml index ba515b4..3f33a47 100644 --- a/states/dovecot/defaults.yaml +++ b/states/dovecot/defaults.yaml @@ -26,9 +26,9 @@ dovecot: special_use: \Trash mailbox Drafts: auto: "no" - special_use: "Drafts" + special_use: \Drafts mailbox Sent: - auto: subscribe + auto: "subscribe" special_use: \Sent mailbox "Sent Messages": auto: "no" @@ -97,7 +97,7 @@ dovecot: lda_mailbox_autocreate: 'yes' lda_mailbox_autosubscribe: 'yes' protocol lda: - mail_plugins: $mail_plugins autocreate sieve quota + mail_plugins: $mail_plugins sieve quota postmaster_address: postmaster@example.com hostname: host.example.com auth_socket_path: /var/run/dovecot/auth-master @@ -121,7 +121,7 @@ dovecot: 20-lmtp.conf: protocol lmtp: postmaster_address: postmaster@example.com - mail_plugins: $mail_plugins autocreate sieve quota + mail_plugins: $mail_plugins sieve quota log_path: /var/log/dovecot-lmtp-errors.log info_log_path: /var/log/dovecot-lmtp.log 20-submission: diff --git a/states/dovecot/install.sls b/states/dovecot/install.sls index 540a8c4..5696f48 100644 --- a/states/dovecot/install.sls +++ b/states/dovecot/install.sls @@ -1,5 +1,6 @@ --- {%- from "dovecot/map.jinja" import dovecot with context %} + dovecot-pkgs: pkg.installed: - pkgs: {{ dovecot.pkgs }} diff --git a/states/dovecot/files/config.j2 b/states/dovecot/templates/config.j2 similarity index 100% rename from states/dovecot/files/config.j2 rename to states/dovecot/templates/config.j2