[Dovecot] expire-tool stops on first box with nothing to expire in it

Michael Wessel michael at think-for-yourself.org
Wed Jul 18 11:40:06 EEST 2012


On 7/14/2012 11:14 PM, Robert Schetterer wrote:
> 1.2.11 is outdated you should upgrade 2.1.8 and try again

Thanks. I knew the version was old but I wasn't quite ready for the 
upgrade. Anyway, I got ready, sat down and upgraded to 2.1.8 this 
weekend and have it all running again now.

Expiring however still behaves the same as far as I can tell. The output 
is different now using doveadm but the behavior seems the same or at 
least very similar.

When I run for example:

doveadm -D search -A mailbox Trash savedbefore 60d > /tmp/discard (the > 
/tmp/discard is only there to send all the listed messages into the file 
to make the output more comprehensive)

the results always end in something like:

doveadm(user at domain.org): Debug: expire: Stopping iteration on key 
shared/expire/nextuser at domain.org/Trash (1340238662 > 1337415398)

If I use different savedbefore values, it stops in different places, but 
always the same with the same value.

If I set the value way down to 3 it only goes through about 70 boxes 
before it stops. Yet there are over 1000 in the expire database.

And if I run the same command on a specific user (one that's not in the 
result set of -A) rather than -A I do get a list of messages. So there 
are definitely users with messages that should be returned as part of 
this but are not.

Any ideas on what's wrong? Just in case my doveconf -n is below.

Michael

# 2.1.8: /usr/local/etc/dovecot/dovecot.conf
# OS: Linux 2.6.18-92.el5 x86_64 CentOS release 5.2 (Final) ext3
auth_master_user_separator = *
base_dir = /var/run/dovecot
dict {
   expire = mysql:/usr/local/etc/dovecot-dict-expire.conf
}
disable_plaintext_auth = no
info_log_path = /var/log/dovecot.log
listen = 10.254.100.254,localhost,10.254.100.253
log_path = /var/log/dovecot.err
mail_gid = 5000
mail_location = maildir:/usr/local/mail/%1u/%1.1u/%u
mail_plugins = " expire quota"
mail_uid = 5000
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
passdb {
   args = /usr/local/etc/restrict-users
   driver = passwd-file
}
passdb {
   args = /usr/local/etc/dovecot/passwd.masterusers
   driver = passwd-file
   master = yes
   pass = yes
}
passdb {
   driver = shadow
}
passdb {
   args = /usr/local/etc/dovecot-ldap.conf
   driver = ldap
}
plugin {
   autocreate = Trash
   autocreate2 = Spam
   autocreate3 = Drafts
   autocreate4 = Sent
   autosubscribe = Trash
   autosubscribe2 = Spam
   autosubscribe3 = Drafts
   autosubscribe4 = Sent
   expire = Spam
   expire2 = Trash
   expire3 = Trash/*
   expire_dict = proxy::expire
   quota = maildir:User quota
   quota_warning = storage=80%% quota-warning 80 %u
   quota_warning2 = storage=85%% quota-warning 85 %u
   quota_warning3 = storage=90%% quota-warning 90 %u
   quota_warning4 = storage=95%% quota-warning 95 %u
   sieve = /usr/local/users/%u/.dovecot.sieve
   sieve_dir = /usr/local/users/%u/sieve
}
protocols = imap pop3 sieve
service auth {
   unix_listener auth-userdb {
     mode = 0600
     user = vmail
   }
}
service dict {
   unix_listener dict {
     mode = 0600
     user = vmail
   }
}
service imap-login {
   executable = /usr/local/libexec/dovecot/imap-login
   process_limit = 384
   process_min_avail = 5
   service_count = 1
}
service imap-postlogin {
   executable = script-login /usr/local/bin/last_login.sh
   user = $default_internal_user
}
service imap {
   executable = /usr/local/libexec/dovecot/imap imap-postlogin
   process_limit = 1024
}
service managesieve-login {
   process_min_avail = 5
   service_count = 1
}
service pop3-login {
   executable = /usr/local/libexec/dovecot/pop3-login
   process_limit = 384
   process_min_avail = 5
   service_count = 1
}
service pop3 {
   executable = /usr/local/libexec/dovecot/pop3
   process_limit = 1024
}
service quota-warning {
   executable = script /usr/local/bin/quota-warning.sh
   unix_listener quota-warning {
     user = vmail
   }
   user = dovecot
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
   driver = passwd
}
userdb {
   args = /usr/local/etc/dovecot-ldap.conf
   driver = ldap
}
protocol sieve {
   managesieve_logout_format = bytes=%i/%o
   managesieve_max_line_length = 65536
   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
}
protocol imap {
   mail_plugin_dir = /usr/local/lib/dovecot/imap
   mail_plugins = quota autocreate expire imap_quota
}
protocol pop3 {
   mail_plugin_dir = /usr/local/lib/dovecot/pop3
   mail_plugins = quota expire
}
protocol lda {
   auth_socket_path = /var/run/dovecot/auth-userdb
   hostname = ms.xyz987.org
   info_log_path = /var/log/dovecot-lda.log
   log_path = /var/log/dovecot-lda.err
   mail_plugin_dir = /usr/local/lib/dovecot/lda
   mail_plugins = quota expire sieve
   postmaster_address = postmaster at domain.org
   sendmail_path = /usr/lib/sendmail
}




More information about the dovecot mailing list