[Dovecot] Problem with quota warning

Patrick Westenberg pw at wk-serv.de
Mon Apr 9 16:35:01 EEST 2012


Hi again,

my test environment is working now and finally I tried to implement my 
quota warning but it is not working. LDA says the mailbox is full even
it is not (only 81% and that is why the quota warning is executed).
Further I used :noenforcing in my script.


Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: 
Namespace INBOX.: Using permissions from 
/var/mail/k-team.info/test/mdbox: mode=0700 gid=-1
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: Quota 
root: name=User quota backend=dict 
args=:file://mdbox/dovecot-quota:noenforcing
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: Quota 
warning: bytes=0 (90%) messages=0 reverse=no command=quota-warning 90 
raw mail user
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: Quota 
warning: bytes=0 (75%) messages=0 reverse=no command=quota-warning 75 
raw mail user
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: dict 
quota: user=raw mail user, uri=file://mdbox/dovecot-quota:noenforcing, 
noenforcing=0
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: none: 
root=, index=, control=, inbox=, alt=
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): Debug: 
Destination address: test at k-team.info (source: user at hostname)
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): 
msgid=unspecified: save failed to INBOX: Quota exceeded (mailbox for 
user is full)
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): 
msgid=unspecified: rejected: Quota exceeded (mailbox for user is full)
Apr  9 15:08:21 backend01 dovecot: lda(test at k-team.info): msgid=: 
Return-Path missing, rejection reason: Quota exceeded (mailbox for user 
is full)


# 2.1.3: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-5-amd64 x86_64 Debian 6.0.4
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
listen = 172.17.99.96
mail_debug = yes
mail_gid = vmail
mail_home = /var/mail/%d/%n
mail_location = mdbox:~/mdbox:INDEX=/var/indexes/%d/%n
mail_plugins = quota
mail_uid = vmail
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
namespace {
   inbox = yes
   location =
   prefix = INBOX.
   separator = .
   type = private
}
passdb {
   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
plugin {
   autocreate = INBOX.Sent
   autocreate2 = INBOX.Trash
   autocreate3 = INBOX.Drafts
   autocreate4 = INBOX.Spamverdacht
   autosubscribe = INBOX.Sent
   autosubscribe2 = INBOX.Trash
   autosubscribe3 = INBOX.Drafts
   autosubscribe4 = INBOX.Spamverdacht
   quota = dict:User quota::file:%h/mdbox/dovecot-quota
   quota_rule2 = INBOX.Trash:storage=+100M
   quota_warning = storage=90%% quota-warning 90 %u
   quota_warning2 = storage=75%% quota-warning 75 %u
   sieve = ~/.dovecot.sieve
   sieve_dir = ~/sieve
   sieve_global_path = /usr/local/etc/dovecot/sieve/default.sieve
}
protocols = imap pop3 lmtp sieve
service auth {
   unix_listener auth-userdb {
     user = vmail
   }
}
service imap-login {
   service_count = 1
}
service lmtp {
   inet_listener lmtp {
     address = 172.17.99.96
     port = 24
   }
}
service managesieve-login {
   inet_listener sieve {
     port = 4190
   }
   service_count = 1
}
service quota-warning {
   executable = script /usr/local/etc/dovecot/quota-warning.sh
   unix_listener quota-warning {
     user = vmail
   }
   user = vmail
}
ssl = required
ssl_cert = </etc/ssl/certs/imap.wk-serv.de.crt
ssl_key = </etc/ssl/certs/imap.wk-serv.de.key
userdb {
   args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
   driver = sql
}
protocol lmtp {
   mail_plugins = quota sieve
}
protocol imap {
   mail_plugins = quota imap_quota autocreate
}
protocol pop3 {
   pop3_client_workarounds = oe-ns-eoh, outlook-no-nuls
}



#!/bin/sh
PERCENT=$1
USER=$2
cat << EOF | /usr/local/libexec/dovecot/dovecot-lda -d $USER -o 
"plugin/quota=dict:User quota::file:%h/mdbox/dovecot-quota:noenforcing"
From: support at example.com
Reply-To: support at example.com
Subject: Speicherplatz Ihrer Mailbox

...








More information about the dovecot mailing list