install_update_dovecot.sh: Fix (permission) error in configuring quota warnings.

This commit is contained in:
2018-02-14 15:31:06 +01:00
parent d7aa579f26
commit 44e3afa5ba
2 changed files with 15 additions and 13 deletions

View File

@ -2594,9 +2594,10 @@ fi
## -
## - service quota-warning {
## - executable = script /usr/local/bin/quota-warning.sh
## - user = dovecot
## - user = vmail
## - unix_listener quota-warning {
## - user = vmail
## - mode = 0666
## - }
## - }
## -
@ -2619,9 +2620,10 @@ plugin {
service quota-warning {
executable = script /usr/local/bin/quota-warning.sh
user = dovecot
user = vmail
unix_listener quota-warning {
user = vmail
mode = 0666
}
}
EOF
@ -2639,7 +2641,7 @@ if $_new ; then
## - create the user-warning script
## -
cat <<EOF >/usr/local/bin/quota-warning.sh
#!/bin/sh
#!/usr/bin/env bash
# author: zhang huangbin <michaelbibby (at) gmail.com>
# purpose: send mail to notify user when his mailbox quota exceeds a
@ -2651,7 +2653,7 @@ LANG=en_US.UTF-8
percent=\$1
user=\$2
cat << EOF | /usr/local/dovecot/libexec/dovecot/deliver -d \${user} -c /usr/local/dovecot/etc/dovecot/dovecot.conf
cat << EOF | /usr/local/dovecot/libexec/dovecot/deliver -d \${user} -c /usr/local/dovecot/etc/dovecot/dovecot.conf -o "plugin/quota=dict:User quota::noenforcing:proxy::quota"
date: \`date +"%a, %e %b %Y %H:%M:%S %z"\`
from: $from_address
reply-to: $reply_to