mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-02 17:14:31 +02:00
Add purge cron job for dbox
This commit is contained in:
parent
ec290acd1f
commit
d400417d0e
3 changed files with 12 additions and 1 deletions
5
target/dovecot/dovecot-purge.cron
Normal file
5
target/dovecot/dovecot-purge.cron
Normal file
|
@ -0,0 +1,5 @@
|
|||
#
|
||||
# Dovecot purge maintenance
|
||||
#
|
||||
# m h dom mon dow user command
|
||||
38 2 * * * root doveadm purge -A
|
|
@ -543,9 +543,13 @@ function _setup_dovecot
|
|||
|
||||
# set mail_location according to mailbox format
|
||||
case "${DOVECOT_MAILBOX_FORMAT}" in
|
||||
sdbox|mdbox|maildir )
|
||||
sdbox|mdbox )
|
||||
_notify 'inf' "Dovecot ${DOVECOT_MAILBOX_FORMAT} format configured"
|
||||
sed -i -e 's/^mail_location = .*$/mail_location = '"${DOVECOT_MAILBOX_FORMAT}"':\/var\/mail\/%d\/%n/g' /etc/dovecot/conf.d/10-mail.conf
|
||||
|
||||
_notify 'inf' "Enabling cron job for dbox purge"
|
||||
mv /etc/cron.d/dovecot-purge.disabled /etc/cron.d/dovecot-purge
|
||||
chmod 644 /etc/cron.d/dovecot-purge
|
||||
;;
|
||||
* )
|
||||
_notify 'inf' "Dovecot maildir format configured (default)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue