Timo Sirainen wrote:
In conf:
quota_warning = storage=80%% /usr/local/bin/quota-warning.sh 80 [EMAIL 
PROTECTED]

You probably want just %u since it has both [EMAIL PROTECTED]

In logs:
IQuota warning: bytes=168611020 (80%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 80 dump-capability@

*what is dump-capability@ ? OS related user?...*

dump-capability is run once at startup so Dovecot can figure out what
IMAP capabilities are supported by the loaded plugins. You should just
ignore that dump-capability check.

Ok.

dovecot.conf:

quota = maildir
quota_rule = *:storage=201M
quota_rule2 = Trash:storage=202M
quota_rule3 = SPAM:ignore
quota_warning = storage=95%% /usr/local/bin/quota-warning.sh 95 %u
quota_warning2 = storage=80%% /usr/local/bin/quota-warning.sh 80 %u
quota_warning3 = storage=99%% /usr/local/bin/quota-warning.sh 99 %u


mx# /usr/local/etc/rc.d/dovecot restart

Stopping dovecot.
Starting dovecot.
ILoading modules from directory: /usr/local/lib/dovecot/imap
IModule loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so
IModule loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so
IEffective uid=65534, gid=65534, home=
IQuota root: name= backend=maildir args=
IQuota rule: root= mailbox=* bytes=210763776 (0%) messages=0 (0%)
IQuota rule: root= mailbox=Trash bytes=211812352 (0%) messages=0 (0%)
IQuota rule: root= mailbox=SPAM ignored
IQuota warning: bytes=200225587 (95%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 95 dump-capability IQuota warning: bytes=168611020 (80%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 80 dump-capability IQuota warning: bytes=208656138 (99%) messages=0 (0%) command=/usr/local/bin/quota-warning.sh 99 dump-capability


#cat quota-warning.sh:

#!/bin/sh

PERCENT=$1
TO=$2

echo "Your mailbox is $PERCENT% full. If it overfill - you will can not get new email. Please clean up your mailbox.

--
Mail Administator" | /usr/bin/mail -s "Email mailbox is $PERCENT% full" $TO -f [EMAIL PROTECTED]

exit 0
----------

But im still got this message with mail from "[EMAIL PROTECTED]" *dmail it is user dovecot deliver runnig from*

If im run quota-warning.sh cript by hands - im got [EMAIL PROTECTED] in mail from. What im do wrong?..

--
Best regards,
Proskurin Kirill

Reply via email to