Fix: Make logrotate state persistant (#3077)

Fixes https://github.com/docker-mailserver/docker-mailserver/issues/3075
This commit is contained in:
Casper 2023-02-09 23:34:26 +01:00 committed by GitHub
parent 88767f7cc8
commit 021a4a3c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -23,8 +23,9 @@ function _misc_save_states
# Always enabled features:
FILES=(
spool/postfix
lib/logrotate
lib/postfix
spool/postfix
)
# Only consolidate state for services that are enabled
@ -75,6 +76,7 @@ function _misc_save_states
[[ ${ENABLE_RSPAMD} -eq 1 ]] && chown -R _rspamd:_rspamd /var/mail-state/lib-rspamd
[[ ${ENABLE_SPAMASSASSIN} -eq 1 ]] && chown -R debian-spamd:debian-spamd /var/mail-state/lib-spamassassin
chown -R root:root /var/mail-state/lib-logrotate
chown -R postfix:postfix /var/mail-state/lib-postfix
# NOTE: The Postfix spool location has mixed owner/groups to take into account: