[Dovecot] expire-tool stops on first box with nothing to expire in it
Hi,
I'm running dovecot 1.2.11 on Centos and have the expire plugin enabled. I've had this in place for some time but until now never actually ran the expire-tool. I'm now trying to put this to use.
The expire plugin as such is working fine and also the tool is working fine - up to a point.
When I run it with --test it goes through a bunch of boxes and lists the messages it would expunge and the new date being logged at the end. As soon as it hits the first box that has nothing in it that's expired however, it stops and goes no further. As an example here are the last two lines of the output when I just ran it:
Info: user@domain.com/Trash: timestamp 1342320464 (Sat Jul 14 19:47:44 2012) -> 1342937319 (Sat Jul 21 23:08:39 2012) Info: nextuser@domain.com/Trash: stop, expire time in future: Sat Jul 14 20:41:49 2012
If I run it again after the indicated expire time it will now also go through the nextuser@domain.com but then again stop as soon as it encounters another user with nothing to expire.
As far as I can tell the same happens when I actually run the tool. Harder to tell of course as there is no output, but I can tell that not all boxes are expunged as they should be.
Any ideas why this would be? Any way to get debug logging on this?
Michael
Am 15.07.2012 05:34, schrieb Michael Wessel:
Hi,
I'm running dovecot 1.2.11 on Centos and have the expire plugin enabled. I've had this in place for some time but until now never actually ran the expire-tool. I'm now trying to put this to use.
The expire plugin as such is working fine and also the tool is working fine - up to a point.
When I run it with --test it goes through a bunch of boxes and lists the messages it would expunge and the new date being logged at the end. As soon as it hits the first box that has nothing in it that's expired however, it stops and goes no further. As an example here are the last two lines of the output when I just ran it:
Info: user@domain.com/Trash: timestamp 1342320464 (Sat Jul 14 19:47:44 2012) -> 1342937319 (Sat Jul 21 23:08:39 2012) Info: nextuser@domain.com/Trash: stop, expire time in future: Sat Jul 14 20:41:49 2012
If I run it again after the indicated expire time it will now also go through the nextuser@domain.com but then again stop as soon as it encounters another user with nothing to expire.
As far as I can tell the same happens when I actually run the tool. Harder to tell of course as there is no output, but I can tell that not all boxes are expunged as they should be.
Any ideas why this would be? Any way to get debug logging on this?
Michael
1.2.11 is outdated you should upgrade 2.1.8 and try again
however 1.2.17 is latest patch level for 1.2
-- Best Regards MfG Robert Schetterer
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@domain.org): Debug: expire: Stopping iteration on key shared/expire/nextuser@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 =
participants (2)
-
Michael Wessel
-
Robert Schetterer