[Dovecot] Dovecot Expire doesn't work

Stef Simoens stef.simoens at scarlet.be
Thu Jun 11 03:43:57 EEST 2009


Hello,

I'm using dovecot and I want to use the "expire" plugin.
However, it doesn't work, i.e. mails do not get deleted.

I ran `/usr/sbin/dovecot --exec-mail ext 
/usr/libexec/dovecot/expire-tool --test`
and besides printing

Info: stef/Trash: no messages left
Info: stef/Spam: no messages left

it doesn't do anything (especially not deleting e-mails).
Obviously, in stef/Trash and stef/Spam, there are e-mails waiting to be 
deleted.

I'm using dbox as mail storage; and use dbox:/var/mail/%u as 
mail_location in dovecot.conf.
Furthermore, I'm running 1.1.16 on a gentoo PPC system.

This is the output from `dovecot -n`
# 1.1.16: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.29-gentoo-r2 ppc Gentoo Base System release 1.12.11.1 xfs
listen: *, [::]
ssl_cert_file: /etc/ssl/dovecot/server.pem
ssl_key_file: /etc/ssl/dovecot/server.key
login_dir: /var/run/dovecot/login
login_executable: /usr/libexec/dovecot/imap-login
verbose_proctitle: yes
mail_privileged_group: mail
mail_location: dbox:/var/mail/%u
mail_plugins: expire
auth default:
  verbose: yes
  debug: yes
  passdb:
    driver: pam
    args: *
  userdb:
    driver: passwd
  socket:
    type: listen
    master:
      path: /var/run/dovecot/auth-master
      mode: 384
plugin:
  quota: fs:Disk Quota
  expire: Trash 7 Spam 30
  expire_dict: proxy::expire
dict:
  expire: db:/var/lib/dovecot/expire.db

A strace on `/usr/sbin/dovecot --exec-mail ext 
/usr/libexec/dovecot/expire-tool --test`
shows the following output:

mkdir("/var/mail/root", 0770)           = -1 EEXIST (File exists)
stat64("/var/mail/root/Trash/dbox-Mails", 0xbfda2708) = -1 ENOENT (No 
such file or directory)
write(2, "Info: stef/Trash: no messages lef"..., 35Info: stef/Trash: no 
messages left
) = 35

which explains why nothing happens 
(stat64("/var/mail/root/Trash/dbox-Mails", which is empty, it should not 
even exist, but it passes by a mkdir), but why does it want to check 
/var/mail/root and not /var/mail/%u (i.e. why no 
stat64(/var/mail/stef/Trash/dbox-Mails))?

Thanks for your help and kind regards,

-- 
Stef Simoens



More information about the dovecot mailing list