[Dovecot] loop when I enable
Hello!
I have a nasty problem with a loop when I enable quota_warning. The mailbox fills up with thousands of email within seconds. This happens only with mbox'es retrieved with POP3.
From MAILER-DAEMON Thu Mar 21 13:54:07 2013
From: support@anup.de
Subject: Mailbox Quota-Warnung
X-UID: 8036
Status:
X-Keywords:
Content-Length: 41
Ihre Mailbox ist jetzt zu below% belegt.
# doveconf -n
# 2.1.7: /usr/etc/dovecot/dovecot.conf
auth_mechanisms = plain cram-md5 auth_verbose = yes disable_plaintext_auth = no hostname = delta.bitcorner.eu log_path = /var/log/dovecot1 mail_home = /var/spool/vhosts/%d/%n mail_plugins = quota managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave vacation-seconds namespace inbox { inbox = yes location = prefix = } passdb { args = /etc/dovecot/passwd driver = passwd-file } plugin { autocreate = Trash autocreate2 = Drafts autocreate3 = Sent autosubscribe = Trash autosubscribe2 = Drafts autosubscribe3 = Sent quota = maildir:User quota quota_rule = *:storage=500MB quota_rule2 = Trash:storage=+10%% sieve = ~/.dovecot.sieve sieve_dir = ~/.sieve sieve_extensions = +vacation-seconds sieve_vacation_default_period = 10d sieve_vacation_max_period = 30d sieve_vacation_min_period = 1h } postmaster_address = postmaster@bitcorner.de protocols = imap pop3 lmtp sieve quota_full_tempfail = yes service auth { unix_listener auth-userdb { group = vmail mode = 0666 user = vmail } } service managesieve-login { inet_listener sieve { port = 4190 } } service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { mode = 0666 user = vmail } user = vmail } ssl_cert =
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" From: support@anup.de Subject: Mailbox Quota-Warnung
Ihre Mailbox ist jetzt zu $PERCENT% belegt. EOF
What can I do? I wonder if there some solution with namespaces possible maybe?
Thank you!
Andreas
On 21.3.2013, at 16.55, Andreas Meyer anmeyer@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).
Hello!
Timo Sirainen tss@iki.fi wrote:
On 21.3.2013, at 16.55, Andreas Meyer anmeyer@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@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@anup.de): Debug: Added userdb setting: mail=maildir:~/ doveadm(miles@anup.de): Debug: Added userdb setting: plugin/quota_rule=*:bytes=30M doveadm(miles@anup.de): Debug: Effective uid=5000, gid=5000, home=/var/spool/vhosts/anup.de/miles doveadm(miles@anup.de): Debug: Quota root: name=User quota backend=maildir args= doveadm(miles@anup.de): Debug: Quota rule: root=User quota mailbox=* bytes=31457280 messages=0 doveadm(miles@anup.de): Debug: Quota rule: root=User quota mailbox=Trash bytes=+3145728 (10%) messages=0 doveadm(miles@anup.de): Debug: Quota warning: bytes=29884416 (95%) messages=0 reverse=no command=quota-warning 95 miles@anup.de doveadm(miles@anup.de): Debug: Quota warning: bytes=25165824 (80%) messages=0 reverse=no command=quota-warning 80 miles@anup.de doveadm(miles@anup.de): Debug: Quota warning: bytes=31457280 (100%) messages=0 reverse=yes command=quota-warning below miles@anup.de doveadm(miles@anup.de): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/ doveadm(miles@anup.de): Debug: maildir++: root=/var/spool/vhosts/anup.de/miles, index=, control=, inbox=/var/spool/vhosts/anup.de/miles, alt= Quota name Type Value Limit % User quota STORAGE 30715 30720 99 User quota MESSAGE 189 -
Andreas
participants (2)
-
Andreas Meyer
-
Timo Sirainen