Hello!
Timo Sirainen <tss at iki.fi> wrote:
> On 21.3.2013, at 16.55, Andreas Meyer <anmeyer at anup.de> wrote:
>
> > The problem occurs when I add the following to dovecot.conf:
> >
> > quota_warning = storage=95%% quota-warning 95 %u
> > quota_warning2 = storage=80%% quota-warning 80 %u
> > quota_warning3 = -storage=100%% quota-warning below %u # user is no
longer over quota
> >
> > The script executed looks like this:
> >
> > #!/bin/sh
> > PERCENT=$1
> > USER=$2
> > cat << EOF | /usr/libexec/dovecot/dovecot-lda -d $USER -o
"plugin/quota=maildir:User quota:noenforcing"
>
> Just because quota isn't enforced, it doesn't mean that the quota
warnings aren't executed. You need to disable quota entirely (e.g. -o
plugin/quota= might work, although it requires a somewhat new version).
>
Now I have -o plugin/quota= in the script. That seems to avoid the loop,
but the user also does not get a quota-warning.
plugin {
quota = maildir:User quota
quota_rule = *:storage=500MB
quota_rule2 = Trash:storage=+10%%
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
quota_warning3 = -storage=100%% quota-warning below %u # user is no longer
over quota
autocreate = Trash
autocreate2 = Drafts
autocreate3 = Sent
autosubscribe = Trash
autosubscribe2 = Drafts
autosubscribe3 = Sent
sieve_extensions = +vacation-seconds
sieve_vacation_min_period = 1h
sieve_vacation_default_period = 10d
sieve_vacation_max_period = 30d
}
# doveadm -D quota get -u miles at anup.de
doveadm(mail1): Debug: Loading modules from directory: /usr/lib/dovecot
doveadm(mail1): Debug: Module loaded: /usr/lib/dovecot/lib10_quota_plugin.so
doveadm(mail1): Debug: Loading modules from directory: /usr/lib/dovecot/doveadm
doveadm(mail1): Debug: Skipping module doveadm_acl_plugin, because dlopen()
failed: /usr/lib/dovecot/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol:
acl_user_module (this is usually intentional, so just ignore this message)
doveadm(mail1): Debug: Skipping module doveadm_expire_plugin, because dlopen()
failed: /usr/lib/dovecot/doveadm/lib10_doveadm_expire_plugin.so: undefined
symbol: expire_set_lookup (this is usually intentional, so just ignore this
message)
doveadm(mail1): Debug: Module loaded:
/usr/lib/dovecot/doveadm/lib10_doveadm_quota_plugin.so
doveadm(mail1): Debug: Skipping module doveadm_zlib_plugin, because dlopen()
failed: /usr/lib/dovecot/doveadm/lib10_doveadm_zlib_plugin.so: undefined symbol:
i_stream_create_deflate (this is usually intentional, so just ignore this
message)
doveadm(mail1): Debug: Skipping module doveadm_fts_plugin, because dlopen()
failed: /usr/lib/dovecot/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol:
fts_list_backend (this is usually intentional, so just ignore this message)
doveadm(miles at anup.de): Debug: Added userdb setting: mail=maildir:~/
doveadm(miles at anup.de): Debug: Added userdb setting:
plugin/quota_rule=*:bytes=30M
doveadm(miles at anup.de): Debug: Effective uid=5000, gid=5000,
home=/var/spool/vhosts/anup.de/miles
doveadm(miles at anup.de): Debug: Quota root: name=User quota backend=maildir
argsdoveadm(miles at anup.de): Debug: Quota rule: root=User quota mailbox=*
bytes=31457280 messages=0
doveadm(miles at anup.de): Debug: Quota rule: root=User quota mailbox=Trash
bytes=+3145728 (10%) messages=0
doveadm(miles at anup.de): Debug: Quota warning: bytes=29884416 (95%) messages=0
reverse=no command=quota-warning 95 miles at anup.de
doveadm(miles at anup.de): Debug: Quota warning: bytes=25165824 (80%) messages=0
reverse=no command=quota-warning 80 miles at anup.de
doveadm(miles at anup.de): Debug: Quota warning: bytes=31457280 (100%)
messages=0 reverse=yes command=quota-warning below miles at anup.de
doveadm(miles at anup.de): Debug: Namespace inbox: type=private, prefix=, sep=,
inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/
doveadm(miles at anup.de): Debug: maildir++:
root=/var/spool/vhosts/anup.de/miles, index=, control=,
inbox=/var/spool/vhosts/anup.de/miles, altQuota name Type Value Limit
%
User quota STORAGE 30715 30720
99
User quota MESSAGE 189 -
Andreas