Hi all, I have finally get working the quota with dovecot. Now i am setting up the quota warning, with this in dovecot.conf: quota_warning = storage=70%% /usr/bin/quota_warning.sh 70 In the plugin section naturally. All seems to work fine, the quota is calculated right, but seems the script is not executed... In dovecot logs i have this: deliver(test at test.com): Oct 27 15:14:53 Info: Quota warning: bytes=10752000 (70%) messages=0 (0%) command=/usr/bin/quota_warning.sh 70 But...nothing happens. My quota_warning.sh is this: #!/bin/bash PERCENT=$1 echo "/usr/lib/dovecot/deliver -d "$USER" -c /usr/local/etc/dovecot-nowarning.conf" > /var/log/quotanotify cat << EOF | /usr/lib/dovecot/deliver -d "$USER" -c /usr/local/etc/dovecot-nowarning.conf From: postmaster at mediaservice.net Subject: quota warning Your mailbox is now $PERCENT% full. EOF I have added the echo for debug pourpose, but no file was created, so the script is not executed. I thinked is a permission problem, but seems not. Now the script is like this: -rwx--x--x 1 dovecot dovecot 317 Oct 27 15:30 /usr/bin/quota_warning.sh What can be the problem? Stuck!!! Claudio. -- ------------ Claudio Prono Systems Development @ Atpss.net Srl, Divisione Implementazione Sistemi Via San Bernardino, 17 - 10137 Torino (TO) - IT Tel +39-011.32.72.100 Fax +39-011.32.46.497 PGP Fingerprint: 75C2 4049 E23D 2FBF A65F 40DB EA5C 11AC C2B0 3647 Disclaimer: http://atpss.net/disclaimer ------------
On Mon, 2008-10-27 at 15:38 +0100, Claudio Prono wrote:> quota_warning = storage=70%% /usr/bin/quota_warning.sh 70 > > In the plugin section naturally. > > All seems to work fine, the quota is calculated right, but seems the > script is not executed... In dovecot logs i have this:The warning script should be executed when going from under 70% to over 70% quota or vice versa. Whether is really works like that in all situations, I don't know. People seem to have been complaining every once in a while.> I have added the echo for debug pourpose, but no file was created, so > the script is not executed. I thinked is a permission problem, but seems > not. Now the script is like this:If your script exits with non-zero, Dovecot logs an error: system(/usr/bin/quota_warning.sh 70) exited with status %d Also I just added this code to make it always log when executing the quota warning script if mail_debug=yes: http://hg.dovecot.org/dovecot-1.1/rev/dcea00b0e290 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20081029/ebac766b/attachment-0002.bin>
Thank u very much, my problem is the permissions. Now quota_warning.sh is owned by postfix.postfix and works great. Strange only a thing, i don't have errors in log for wrong permissions... Ty, Claudio. Timo Sirainen ha scritto:> On Mon, 2008-10-27 at 15:38 +0100, Claudio Prono wrote: > >> quota_warning = storage=70%% /usr/bin/quota_warning.sh 70 >> >> In the plugin section naturally. >> >> All seems to work fine, the quota is calculated right, but seems the >> script is not executed... In dovecot logs i have this: >> > > The warning script should be executed when going from under 70% to over > 70% quota or vice versa. Whether is really works like that in all > situations, I don't know. People seem to have been complaining every > once in a while. > > >> I have added the echo for debug pourpose, but no file was created, so >> the script is not executed. I thinked is a permission problem, but seems >> not. Now the script is like this: >> > > If your script exits with non-zero, Dovecot logs an error: > > system(/usr/bin/quota_warning.sh 70) exited with status %d > > Also I just added this code to make it always log when executing the > quota warning script if mail_debug=yes: > http://hg.dovecot.org/dovecot-1.1/rev/dcea00b0e290 > >-- ------------ Claudio Prono Systems Development @ Atpss.net Srl, Divisione Implementazione Sistemi Via San Bernardino, 17 - 10137 Torino (TO) - IT Tel +39-011.32.72.100 Fax +39-011.32.46.497 PGP Fingerprint: 75C2 4049 E23D 2FBF A65F 40DB EA5C 11AC C2B0 3647 Disclaimer: http://atpss.net/disclaimer ------------