Hello,
I have dovecot set up with expire-tool to nuke Junk messages greater than 30 days old. On a server with many user accounts, it seems to work on most of them.
However, on my user account, expire-tool skips my Junk folder entirely, despite it containing messages from January of this year. Here is the expire-tool --test output:
Info: alex@scienceforums.net/Junk: timestamp 1284027481 (Thu Sep 9 05:18:01 2010) -> 1304023056 (Thu Apr 28 15:37:36 2011)
Then it skips to the next mailbox. (Note that I intentionally set the timestamp back to force it to consider my mailbox.) I don't understand why it doesn't want to expunge my 2700 junk messages when it will expunge several thousand in other accounts happily. The expire plugin has been enabled for probably over a year, so all of the messages should be tracked.
My only hypothesis is that it has something to do with variables in the mail_location; however, mail_location should be overridden by a user_query, though that contains variables too. Would this account for the issue? It seems unlikely, since other users on the server work just fine.
dovecot -n output for the interested:
# 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-24-server x86_64 Ubuntu 10.04.2 LTS ext3 base_dir: /var/run/dovecot/ log_timestamp: %Y-%m-%d %H:%M:%S protocols: managesieve imaps pop3s listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 listen(managesieve): * ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 ssl_listen(managesieve): login_dir: /var/run/dovecot//login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login first_valid_uid: 150 last_valid_uid: 150 mail_privileged_group: mail mail_location: maildir:/var/vmail/%d/%u mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota imap_quota expire mail_plugins(imap): quota imap_quota expire mail_plugins(pop3): quota expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: mail_plugins: quota sieve expire postmaster_address: postmaster@xyloid.org sendmail_path: /usr/lib/sendmail auth_socket_path: /var/run/dovecot/auth-master sieve_global_path: /etc/dovecot/sieve.global auth default: user: nobody passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: vmail group: mail plugin: quota: dict:user::proxy::quotadict quota_rule: *:storage=1G quota_rule2: Trash:storage=10%% quota_rule3: Junk:ignore sieve: /var/vmail/%d/%n/dovecot.sieve expire: Trash 7 Trash/* 7 Junk 30 expire_dict: proxy::expire dict: quotadict: mysql:/etc/dovecot/dovecot-dict-quota.conf expire: mysql:/etc/dovecot/dovecot-dict-expire.conf
And dovecot-dict-expire.conf:
connect = host=localhost dbname=mail user=mail password=[password]
map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp
fields { username = $user mailbox = $mailbox } }
Thanks.
- Alex Reinhart