[Dovecot] trash plugin not doing it's job

Jan-Frode Myklebust janfrode at tanso.net
Thu Oct 18 11:05:44 EEST 2012


I enabled the trash plugin yesterday, adding "trash" to mail_plugins,
and configuring the plugin setting "trash =
/etc/dovecot/dovecot-trash.conf.ext".


But I still see users with lots of files in INBOX.Trash getting
bounced because of quota exceeded:


postfix/lmtp[26273]::  C89F490061: to=<XXXXXXXXXXXXX at example.no>,
relay=loadbalancers.example.net[192.168.42.15]:24, delay=1.2,
delays=0.61/0.02/0/0.54, dsn=5.2.2, status=bounced (host
loadbalancers.example.net[192.168.42.15] said: 552 5.2.2
<XXXXXXXXXXXXd at example.no> Quota exceeded (mailbox for user is full)
(in reply to end of DATA command))

dovecot::  lmtp(19730, XXXXXXX at example.no): Error:
BErxFCyrf1ASTQAAWNPRnw: sieve:
msgid=<e33d481dc9d9442fa79f55e45a516c82 at BizWizard>: failed to store
into mailbox 'INBOX': Quota exceeded (mailbox for user is full)


$ sudo doveadm quota get -u XXXXXXXX at example.no
Quota name                                                      Type
   Value   Limit  %
UserQuota
STORAGE 1048559 1048576 99
UserQuota
MESSAGE    4487       -  0


Postfix if delivering via LMTP trough dovecot director.


Anybody see anything obvious in my config:

------------------------------------------------------------
# 2.0.14: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-194.26.1.el5 x86_64 Red Hat Enterprise Linux Server
release 5.5 (Tikanga)
auth_cache_size = 100 M
auth_verbose = yes
auth_verbose_passwords = sha1
disable_plaintext_auth = no
login_trusted_networks = 192.168.0.0/16 109.247.114.192/27
mail_gid = 3000
mail_home = /srv/mailstore/%256LRHu/%Ld/%Ln
mail_location = maildir:~/:INDEX=/indexes/%1u/%1.1u/%u
mail_max_userip_connections = 20
c = quota zlib trash
mail_uid = 3000
maildir_stat_dirs = yes
maildir_very_dirty_syncs = yes
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
mmap_disable = yes
namespace {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
  type = private
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
plugin {
  quota = dict:UserQuota::file:%h/dovecot-quota
  sieve = /sieve/%1Lu/%1.1Lu/%Lu/.dovecot.sieve
  sieve_before = /etc/dovecot/sieve/dovecot.sieve
  sieve_dir = /sieve/%1Lu/%1.1Lu/%Lu
  sieve_max_script_size = 1M
  trash = /etc/dovecot/dovecot-trash.conf.ext
  zlib_save = gz
  zlib_save_level = 6
}
postmaster_address = postmaster at example.net
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = $default_internal_user
}
service auth {
  client_limit = 4521
  unix_listener auth-userdb {
    group =
    mode = 0600
    user = atmail
  }
}
service imap-login {
  inet_listener imap {
    address = *
    port = 143
  }
  process_min_avail = 4
  service_count = 0
  vsz_limit = 1 G
}
service imap-postlogin {
  executable = script-login /usr/local/sbin/imap-postlogin.sh
}
service imap {
  executable = imap imap-postlogin
  process_limit = 2048
}
service lmtp {
  client_limit = 1
  inet_listener lmtp {
    address = *
    port = 24
  }
  process_limit = 25
  process_min_avail = 10
}
service managesieve-login {
  inet_listener sieve {
    address = *
    port = 4190
  }
  service_count = 1
}
service pop3-login {
  inet_listener pop3 {
    address = *
    port = 110
  }
  process_min_avail = 4
  service_count = 0
  vsz_limit = 1 G
}
service pop3-postlogin {
  executable = script-login /usr/local/sbin/pop3-postlogin.sh
}
service pop3 {
  executable = pop3 pop3-postlogin
  process_limit = 2048
}
ssl = no
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocol lmtp {
  mail_plugins = quota zlib trash sieve
}
protocol imap {
  imap_client_workarounds = delay-newmail
  mail_plugins = quota zlib trash imap_quota
}
protocol pop3 {
  mail_plugins = quota zlib trash
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = UID%u-%v
}
protocol sieve {
  managesieve_logout_format = bytes=%i/%o
}

------------------------------------------------------------
and my trash config:

$ cat /etc/dovecot/dovecot-trash.conf.ext
# Spam mailbox is emptied before Trash
1 INBOX.Spam
# Trash mailbox is emptied before Sent
2 INBOX.Trash

Global sieve script:

$ cat /etc/dovecot/sieve/dovecot.sieve

require ["comparator-i;ascii-numeric","relational","fileinto","mailbox"];
if allof (
	not header :matches "x-spam-score" "-*",
	header :value "ge" :comparator "i;ascii-numeric" "x-spam-score" "10" )
{
	discard;
	stop;
}
elsif allof (
	not header :matches "x-spam-score" "-*",
	header :value "ge" :comparator "i;ascii-numeric" "x-spam-score" "6" )
{
	fileinto :create "INBOX.Spam";
}


  -jf



More information about the dovecot mailing list