postinst mail_privileged_grup = mail check and sed
authorZeljko Boros <Zeljko.Boros@carnet.hr>
Fri, 14 May 2021 14:32:18 +0000 (16:32 +0200)
committerZeljko Boros <Zeljko.Boros@carnet.hr>
Fri, 14 May 2021 14:32:18 +0000 (16:32 +0200)
debian/postinst

index 95c1ccb..e02759c 100755 (executable)
@@ -16,6 +16,12 @@ cp_check_and_sed 'disable_plaintext_auth.*yes' \
                  's/disable_plaintext_auth.*$/disable_plaintext_auth = no/g' \
                 /etc/dovecot/conf.d/10-auth.conf || true
 
+if ! grep -q "mail_privileged_group.*mail$" /etc/dovecot/conf.d/10-mail.conf \
+       cp_check_and_sed 'mail_privileged_group' \
+                        's/mail_privileged_group.*$/mail_privileged_group = mail/g' \
+                        /etc/dovecot/conf.d/10-mail.conf || true
+fi
+
 cp_check_and_sed '#imap_client_workarounds' \
                  's/#imap_client_workarounds/imap_client_workarounds/g' \
                 /etc/dovecot/conf.d/20-imap.conf || true