mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-14 10:52:49 +02:00
244ab191bd
[Dovecot] Use "--enable-hardening" flag [Dovecot] Fix cronjobs [Dovecot] Use /var/volatile to prevent locking files from being written to NFS storage (if vmail is on NFS) [Dovecot] Change userdb query [Dovecot] Use /var/attachments for mdbox attachment deduplication and /var/index for index files [Dovecot] Fix sieve user creation [Dovecot] Make console writable [Dovecot] Fix trim_logs.sh
16 lines
629 B
Bash
Executable File
16 lines
629 B
Bash
Executable File
#!/bin/bash
|
|
catch_non_zero() {
|
|
CMD=${1}
|
|
${CMD} > /dev/null
|
|
EC=$?
|
|
if [ ${EC} -ne 0 ]; then
|
|
echo "Command ${CMD} failed to execute, exit code was ${EC}"
|
|
fi
|
|
}
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM ACME_LOG 0 LOG_LINES"
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM POSTFIX_MAILLOG 0 LOG_LINES"
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM DOVECOT_MAILLOG 0 LOG_LINES"
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM SOGO_LOG 0 LOG_LINES"
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM NETFILTER_LOG 0 LOG_LINES"
|
|
catch_non_zero "/usr/bin/redis-cli -h redis LTRIM AUTODISCOVER_LOG 0 LOG_LINES"
|